Esempio n. 1
0
        public void ShouldClampWithoutOrder()
        {
            var numPositive = MathX.ClampWithoutOrder(6f, 2f, -2f);

            Assert.AreEqual(numPositive, 2f);

            var numNegative = MathX.ClampWithoutOrder(-6f, 2f, -2f);

            Assert.AreEqual(numNegative, -2f);
        }