コード例 #1
0
 public static uint hash(bool2x4 v)
 {
     return(csum(select(uint2(0x45A22087u, 0xFC104C3Bu), uint2(0x5FFF6B19u, 0x5E6CBF3Bu), v.c0) +
                 select(uint2(0xB546F2A5u, 0xBBCF63E7u), uint2(0xC53F4755u, 0x6985C229u), v.c1) +
                 select(uint2(0xE133B0B3u, 0xC3E0A3B9u), uint2(0xFE31134Fu, 0x712A34D7u), v.c2) +
                 select(uint2(0x9D77A59Bu, 0x4942CA39u), uint2(0xB40EC62Du, 0x565ED63Fu), v.c3)));
 }
コード例 #2
0
 public float2x4(bool2x4 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);
     this.c2 = math.select(new float2(sfloat.Zero), new float2(sfloat.One), v.c2);
     this.c3 = math.select(new float2(sfloat.Zero), new float2(sfloat.One), v.c3);
 }
コード例 #3
0
 public static uint2 hashwide(bool2x4 v)
 {
     return(select(uint2(0x93C30C2Bu, 0xDCAF0351u), uint2(0x6E050B01u, 0x750FDBF5u), v.c0) +
            select(uint2(0x7F3DD499u, 0x52EAAEBBu), uint2(0x4599C793u, 0x83B5E729u), v.c1) +
            select(uint2(0xC267163Fu, 0x67BC9149u), uint2(0xAD7C5EC1u, 0x822A7D6Du), v.c2) +
            select(uint2(0xB492BF15u, 0xD37220E3u), uint2(0x7AA2C2BDu, 0xE16BC89Du), v.c3));
 }
コード例 #4
0
 public int2x4(bool2x4 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);
     this.c2 = math.select(new int2(0), new int2(1), v.c2);
     this.c3 = math.select(new int2(0), new int2(1), v.c3);
 }
コード例 #5
0
 public uint2x4(bool2x4 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);
     this.c2 = math.select(new uint2(0u), new uint2(1u), v.c2);
     this.c3 = math.select(new uint2(0u), new uint2(1u), v.c3);
 }
コード例 #6
0
 public static bool4x2 transpose(bool2x4 v)
 {
     return(bool4x2(
                v.c0.x, v.c0.y,
                v.c1.x, v.c1.y,
                v.c2.x, v.c2.y,
                v.c3.x, v.c3.y));
 }
コード例 #7
0
 public static float2x4 float2x4(bool2x4 v)
 {
     return(new float2x4(v));
 }
コード例 #8
0
 public static int2x4 int2x4(bool2x4 v)
 {
     return(new int2x4(v));
 }
コード例 #9
0
 public static uint2x4 uint2x4(bool2x4 v)
 {
     return(new uint2x4(v));
 }