Exemple #1
0
 public PlaneAngle(double radians)
 {
     if (double.IsInfinity(radians) || double.IsNaN(radians))
     {
         this.data = double.NaN;
     }
     this.data = AngleUtils.Normalize(radians);
 }
Exemple #2
0
 public CompassAngle(double radians)
 {
     if (double.IsInfinity(radians) || double.IsNaN(radians))
     {
         this.data = double.NaN;
     }
     this.data = AngleUtils.NormalizePositive(radians);
 }
Exemple #3
0
        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);
        }
Exemple #4
0
 public PlaneAngle(double data, AngularUnit units)
     : this(AngleUtils.GetRadians(data, units))
 {
 }