예제 #1
0
        public void FloorTest()
        {
            //check Floor(double a)
            Assert.AreEqual(5, OwnMath.floor(5.3));
            Assert.AreEqual(-5, OwnMath.floor(-4.4));
            Assert.AreEqual(0, OwnMath.floor(0.25));
            Assert.IsInstanceOfType(OwnMath.floor(0.25), typeof(double));

            //check FloorInt(double a)
            Assert.AreEqual(5, OwnMath.floorInt(5.3));
            Assert.AreEqual(-5, OwnMath.floorInt(-4.4));
            Assert.AreEqual(0, OwnMath.floorInt(0.25));
            Assert.IsInstanceOfType(OwnMath.floorInt(0.25), typeof(int));
        }