Exemplo n.º 1
0
        public void GetClampedTest()
        {
            ColorRGB96 input    = new ColorRGB96(2.0f, -3.0f, 0.5f);
            ColorRGB96 expected = new ColorRGB96(1.0f, 0.0f, 0.5f);

            ColorRGB96 actual = input.GetClamped();

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void GetClampedShouldEqualClamp()
        {
            ColorRGB96 input = new ColorRGB96(1.5f, 0.4f, -51.5f);

            ColorRGB96 clamp = input.GetClamped();

            input.Clamp();

            bool expected = true;
            bool actual   = clamp == input;

            Assert.AreEqual(expected, actual);
        }