Skip to content

Commit

Permalink
Tweak angles
Browse files Browse the repository at this point in the history
  • Loading branch information
dfkeenan committed Nov 26, 2023
1 parent 9f65f5b commit b5013c0
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,24 @@ public readonly struct Angle<T>
, ISubtractionOperators<Angle<T>,Angle<T>,Angle<T>>
, IParsable<Angle<T>>
, ISpanParsable<Angle<T>>
, IUtf8SpanParsable<Angle<T>>
, IFormattable
, IUtf8SpanFormattable
where T : IFloatingPointIeee754<T>
{

public readonly T TotalRadians;

public Angle(T totalRadians) { }


/// <summary>Angle in degrees in the range [0, 360].</summary>
public T Degrees { get; }
/// <summary>Total angle in degrees.</summary>
public T TotalDegrees { get; }
public T TotalRdians { get; }
public T Milliradians { get; }
/// <summary>Angle in radians in range [π, -π].</summary>
public T Radians { get; }

public T Hours { get; }
public T Minutes { get; }
public T Seconds { get; }

Expand Down Expand Up @@ -185,10 +191,7 @@ public static class Angle
public static Angle<T> FromDegrees<T>(T degrees)
where T : IFloatingPointIeee754<T>
=> default;
public static Angle<T> FromGradians<T>(T gradians)
where T : IFloatingPointIeee754<T>
=> default;
public static Angle<T> FromMilliradians<T>(T milliradians)
public static Angle<T> FromHours<T>(T hours)
where T : IFloatingPointIeee754<T>
=> default;
public static Angle<T> FromMinutes<T>(T minutes)
Expand All @@ -198,6 +201,10 @@ public static class Angle
where T : IFloatingPointIeee754<T>
=> default;

public static Angle<T> FromTimeSpan<T>(TimeSpan timeSpan)
where T : IFloatingPointIeee754<T>
=> default;

public static Angle<T> Min<T>(Angle<T> left, Angle<T> right)
where T : IFloatingPointIeee754<T>
=> default;
Expand Down

0 comments on commit b5013c0

Please sign in to comment.