Skip to content

Commit

Permalink
Merge pull request #46 from WildernessLabs/v1.7.0
Browse files Browse the repository at this point in the history
Release 1.7.0
  • Loading branch information
jorgedevs authored Jan 10, 2024
2 parents 50d61c0 + ca5ee03 commit 97bc47d
Show file tree
Hide file tree
Showing 3 changed files with 365 additions and 357 deletions.
6 changes: 4 additions & 2 deletions Source/Meadow.Units/Angle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public enum UnitType
[Pure]
public double From(UnitType convertTo)
{
return ConvertTo360(AngleConversions.Convert(Value, UnitType.Degrees, convertTo));
return AngleConversions.Convert(Value, UnitType.Degrees, convertTo);
}

/// <summary>
Expand Down Expand Up @@ -219,8 +219,10 @@ public override bool Equals(object obj)
private static double ConvertTo360(double value)
{
value %= 360;
if (value < 0)
while (value < 0)
{
value += 360;
}
return value;
}

Expand Down
Loading

0 comments on commit 97bc47d

Please sign in to comment.