public void Can_preform_modulo(double value, double mod, double expectedResult)
        {
            var radianVal = Radians.FromRaw(value);
            var radianMod = Radians.FromRaw(mod);

            Assert.Equal(Radians.FromRaw(expectedResult), radianVal % radianMod);
        }
        public void Can_compare_for_less_than(double a, double b, bool expectedResult)
        {
            var radian1 = Radians.FromRaw(a);
            var radian2 = Radians.FromRaw(b);

            Assert.Equal(expectedResult, radian1 < radian2);
        }
        public void Can_subtract(double a, double b, double result)
        {
            var radian1 = Radians.FromRaw(a);
            var radian2 = Radians.FromRaw(b);

            Assert.Equal(Radians.FromRaw(result), radian1 - radian2);
        }
Beispiel #4
0
        public void Correctly_converts_radians_from_degrees()
        {
            var degrees = Degrees.FromRaw(180);

            var angle = Angle.From(degrees);

            Assert.Equal(Radians.FromRaw(Math.PI), angle.Radians);
        }
Beispiel #5
0
        public void Correctly_converts_degrees_from_radians()
        {
            var radians = Radians.FromRaw(Math.PI);

            var angle = Angle.From(radians);

            Assert.Equal(Degrees.FromRaw(180), angle.Degrees);
        }
Beispiel #6
0
        public void Can_create_from_radians()
        {
            var radians = Radians.FromRaw(Math.PI);

            var angle = Angle.From(radians);

            Assert.Equal(radians, angle.Radians);
        }
        public void Can_create_from_number(double n, double expected)
        {
            var radian = Radians.FromRaw(n);

            Assert.Equal(expected, radian.Value);
        }