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

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