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

            return((short)((intermediate + touint8(intermediate > 0)) / 2));
        }
Exemple #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);
        }
Exemple #9
0
 public static short2 rol(short2 x, int n)
 {
     return((short2)rol((ushort2)x, n));
 }
Exemple #10
0
 public static int indexof(short2 v, short x)
 {
     return(indexof((ushort2)v, (ushort)x));
 }
Exemple #11
0
 public static short2 mad(short2 a, short2 b, short2 c)
 {
     return((a * b) + c);
 }
Exemple #12
0
 public static short2 tzcnt(short2 x)
 {
     return((short2)tzcnt((ushort2)x));
 }
Exemple #13
0
 public static ushort2 gcd(short2 x, short2 y)
 {
     return(gcd((ushort2)abs(x), (ushort2)abs(y)));
 }