Beispiel #1
0
 public static uint2x2 uint2x2(bool2x2 v)
 {
     return(new uint2x2(v));
 }
Beispiel #2
0
 public uint2x2(bool2x2 v)
 {
     this.c0 = math.select(new uint2(0u), new uint2(1u), v.c0);
     this.c1 = math.select(new uint2(0u), new uint2(1u), v.c1);
 }
Beispiel #3
0
 public static float2x2 float2x2(bool2x2 v)
 {
     return(new float2x2(v));
 }
Beispiel #4
0
 public float2x2(bool2x2 v)
 {
     this.c0 = math.select(new float2(sfloat.Zero), new float2(sfloat.One), v.c0);
     this.c1 = math.select(new float2(sfloat.Zero), new float2(sfloat.One), v.c1);
 }
Beispiel #5
0
 public int2x2(bool2x2 v)
 {
     this.c0 = math.select(new int2(0), new int2(1), v.c0);
     this.c1 = math.select(new int2(0), new int2(1), v.c1);
 }
Beispiel #6
0
 public static int2x2 int2x2(bool2x2 v)
 {
     return(new int2x2(v));
 }
Beispiel #7
0
 public static uint2 hashwide(bool2x2 v)
 {
     return(select(uint2(0x88FCAB2Du, 0x614DA60Du), uint2(0x5BA2C50Bu, 0x8C455ACBu), v.c0) +
            select(uint2(0xCD266C89u, 0xF1852A33u), uint2(0x77E35E77u, 0x863E3729u), v.c1));
 }
Beispiel #8
0
 public static uint hash(bool2x2 v)
 {
     return(csum(select(uint2(0x7AF32C49u, 0xAE131389u), uint2(0x5D1B165Bu, 0x87096CD7u), v.c0) +
                 select(uint2(0x4C7F6DD1u, 0x4822A3E9u), uint2(0xAAC3C25Du, 0xD21D0945u), v.c1)));
 }
Beispiel #9
0
 public static bool2x2 transpose(bool2x2 v)
 {
     return(bool2x2(
                v.c0.x, v.c0.y,
                v.c1.x, v.c1.y));
 }