Skip to content

Commit 59cafc6

Browse files
authored
Merge pull request #10 from synercoder/features/remove-double-conversion
Remove conversion to double option
2 parents ee371e8 + 4f2aca6 commit 59cafc6

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

src/Synercoding.Primitives/Size.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public Orientation Orientation
7373
public Size ConvertTo(Unit unit)
7474
{
7575
return new Size(
76-
width: Width.ConvertTo(unit),
77-
height: Height.ConvertTo(unit),
76+
width: Width.ConvertTo(unit).Raw,
77+
height: Height.ConvertTo(unit).Raw,
7878
unit);
7979
}
8080

src/Synercoding.Primitives/Spacing.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ public static Spacing Nothing
9393
public Spacing ConvertTo(Unit unit)
9494
{
9595
return new Spacing(
96-
left: Left.ConvertTo(unit),
97-
top: Top.ConvertTo(unit),
98-
right: Right.ConvertTo(unit),
99-
bottom: Bottom.ConvertTo(unit),
96+
left: Left.ConvertTo(unit).Raw,
97+
top: Top.ConvertTo(unit).Raw,
98+
right: Right.ConvertTo(unit).Raw,
99+
bottom: Bottom.ConvertTo(unit).Raw,
100100
unit);
101101
}
102102

src/Synercoding.Primitives/Value.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,5 @@ public bool Equals(Value other)
238238
/// <returns>The result of the division operation</returns>
239239
public static double operator /(Value a, double b)
240240
=> a.Raw / b;
241-
242-
/// <summary>
243-
/// Convert the <see cref="Value"/> to a <see cref="double"/>, losing the <see cref="Unit"/> in the process.
244-
/// </summary>
245-
/// <param name="value">The <see cref="double"/> value of this <see cref="Value"/></param>
246-
public static implicit operator double(Value value)
247-
=> value.Raw;
248241
}
249242
}

0 commit comments

Comments
 (0)