Example #1
0
        static int Main(string[] args)
        {
            Point a = new Point(10, 50, 0, -100);
            Point b = new Point(10);
            Point c = Point.Max(a, b);

            if (((int)c.Y) != 50 || ((int)c.W) != 10)
            {
                return(0);
            }
            Point d = Point.Min(a, b);
            Point q = Point.Min(d, d);

            if (q != d)
            {
                return(0);
            }
            if (((int)d.W) != -100)
            {
                return(0);
            }
            return(100);
        }
Example #2
0
 public static Vec4 Clamp(this Vec4 value, Vec4 min, Vec4 max)
 {
     return(Vec4.Max(min, Vec4.Min(max, value)));
 }