public PlaneAngle(double radians) { if (double.IsInfinity(radians) || double.IsNaN(radians)) { this.data = double.NaN; } this.data = AngleUtils.Normalize(radians); }
public CompassAngle(double radians) { if (double.IsInfinity(radians) || double.IsNaN(radians)) { this.data = double.NaN; } this.data = AngleUtils.NormalizePositive(radians); }
public static double GetRadians(double a, AngularUnit au) { switch (au) { case AngularUnit.Radians: return(a); case AngularUnit.Degrees: return(AngleUtils.DegreesToRadians(a)); case AngularUnit.Gradians: return(AngleUtils.GradiansToRadians(a)); case AngularUnit.ArcSeconds: return(AngleUtils.ArcSecondsToRadians(a)); } return(double.NaN); }
public PlaneAngle(double data, AngularUnit units) : this(AngleUtils.GetRadians(data, units)) { }