Beispiel #1
0
 public void CanConvertRadianToDegree()
 {
     AssertHelpers.AlmostEqual(60.0, Trig.RadianToDegree(Math.PI / 3.0), 15);
 }
Beispiel #2
0
 public void CanConvertRadianToGrad()
 {
     AssertHelpers.AlmostEqual(200.0 / 3.0, Trig.RadianToGrad(Math.PI / 3.0), 15);
 }
Beispiel #3
0
 public void CanConvertGradToDegree()
 {
     AssertHelpers.AlmostEqual(180, Trig.GradToDegree(200), 15);
 }
Beispiel #4
0
 public void CanConvertGradToRadian()
 {
     AssertHelpers.AlmostEqual(Math.PI, Trig.GradToRadian(200), 15);
 }
Beispiel #5
0
 public void CanConvertDegreeToRadian()
 {
     AssertHelpers.AlmostEqual(Math.PI / 2, Trig.DegreeToRadian(90), 15);
 }
Beispiel #6
0
 public void CanConvertDegreeToGrad()
 {
     AssertHelpers.AlmostEqual(90 / .9, Trig.DegreeToGrad(90), 15);
 }
Beispiel #7
0
        public void CanComputeInverseHyperbolicSecant([Values(0, 0.5, 1)] double value, [Values(double.PositiveInfinity, 1.3169578969248167, 0.0)] double expected)
        {
            var actual = Trig.InverseHyperbolicSecant(value);

            AssertHelpers.AlmostEqual(expected, actual, 14);
        }
Beispiel #8
0
        public void CanComputeInverseHyperbolicCotangent([Values(8388608, -8388608, 1, -1)] double value, [Values(1.1920928955078181e-7, -1.1920928955078181e-7, double.PositiveInfinity, double.NegativeInfinity)] double expected)
        {
            var actual = Trig.InverseHyperbolicCotangent(value);

            AssertHelpers.AlmostEqual(expected, actual, 14);
        }
Beispiel #9
0
        public void CanComputeInverseHyperbolicCosine([Values(1.0, 8388608)] double value, [Values(0.0, 16.635532333438682)] double expected)
        {
            var actual = Trig.InverseHyperbolicCosine(value);

            AssertHelpers.AlmostEqual(expected, actual, 14);
        }