コード例 #1
0
        public void T02cGetSign_ReturnPositionSign()
        {
            var vec1 = new Vector3(0, -10, 0);
            var vec2 = new Vector3(-1, -2, 0);

            var sut = new VectorCalculations(vec1, vec2);

            Assert.AreEqual(1, sut.GetSign());
        }
コード例 #2
0
        public void T03cGetSign_ReturnNegativeSign()
        {
            var vec1 = new Vector3(0, 0, -10);
            var vec2 = new Vector3(1, 0, -3);

            var sut = new VectorCalculations(vec1, vec2);

            Assert.AreEqual(-1, sut.GetSign());
        }
コード例 #3
0
        public void T01GetAngle_Return90Degrees()
        {
            var vec1 = new Vector3(0, 1, 0);
            var vec2 = new Vector3(1, 0, 0);

            var sut = new VectorCalculations(vec1, vec2);

            Assert.AreEqual(90, sut.GetAngle());
        }