Beispiel #1
0
 public short2x2(short v)
 {
     this.c0 = v;
     this.c1 = v;
 }
Beispiel #2
0
 public static half2 ashalf(short2 x)
 {
     return(*(half2 *)&x);
 }
Beispiel #3
0
 public short2x2(short2 c0, short2 c1)
 {
     this.c0 = c0;
     this.c1 = c1;
 }
Beispiel #4
0
 public short2x2(short m00, short m01,
                 short m10, short m11)
 {
     this.c0 = new short2(m00, m10);
     this.c1 = new short2(m01, m11);
 }
Beispiel #5
0
 public static int cprod(short2 x)
 {
     return(x.x * x.y);
 }
Beispiel #6
0
        public static short avg(short2 c)
        {
            int intermediate = csum(c);

            return((short)((intermediate + touint8(intermediate > 0)) / 2));
        }
Beispiel #7
0
 public static short2 reversebits(short2 x)
 {
     return((short2)reversebits((ushort2)x));
 }
        public static bool2 toboolsafe(short2 x)
        {
            byte2 clamped = (byte2)clamp(x, 0, 1);

            return(*(bool2 *)&clamped);
        }
Beispiel #9
0
 public static short2 rol(short2 x, int n)
 {
     return((short2)rol((ushort2)x, n));
 }
Beispiel #10
0
 public static int indexof(short2 v, short x)
 {
     return(indexof((ushort2)v, (ushort)x));
 }
Beispiel #11
0
 public static short2 mad(short2 a, short2 b, short2 c)
 {
     return((a * b) + c);
 }
Beispiel #12
0
 public static short2 tzcnt(short2 x)
 {
     return((short2)tzcnt((ushort2)x));
 }
Beispiel #13
0
 public static ushort2 gcd(short2 x, short2 y)
 {
     return(gcd((ushort2)abs(x), (ushort2)abs(y)));
 }