예제 #1
0
        public void AngleToIntScalesCorrectly()
        {
            const float FullAngle    = 2 * (float)Math.PI;
            const int   FullAngleInt = 1000;

            var testAngle1 = AngleHelper.AngleToInt(FullAngle);
            var testAngle2 = AngleHelper.AngleToInt(FullAngle / 2);
            var testAngle3 = AngleHelper.AngleToInt(FullAngle / 3);

            testAngle1.Should().Be(FullAngleInt);
            testAngle2.Should().Be(FullAngleInt / 2);
            testAngle3.Should().Be(FullAngleInt / 3);
        }