Example #1
0
 public static int3x3 transpose(int3x3 v)
 {
     return(int3x3(
                v.c0.x, v.c0.y, v.c0.z,
                v.c1.x, v.c1.y, v.c1.z,
                v.c2.x, v.c2.y, v.c2.z));
 }
Example #2
0
        public static int determinant(int3x3 m)
        {
            int3 c0 = m.c0;
            int3 c1 = m.c1;
            int3 c2 = m.c2;

            int m00 = c1.y * c2.z - c1.z * c2.y;
            int m01 = c0.y * c2.z - c0.z * c2.y;
            int m02 = c0.y * c1.z - c0.z * c1.y;

            return(c0.x * m00 - c1.x * m01 + c2.x * m02);
        }
Example #3
0
 public uint3x3(int3x3 v)
 {
     this.c0 = (uint3)v.c0;
     this.c1 = (uint3)v.c1;
     this.c2 = (uint3)v.c2;
 }
Example #4
0
 public static uint3x3 uint3x3(int3x3 v)
 {
     return(new uint3x3(v));
 }
Example #5
0
 public static uint3 hashwide(int3x3 v)
 {
     return((asuint(v.c0) * uint3(0xAD7C5EC1u, 0x822A7D6Du, 0xB492BF15u) +
             asuint(v.c1) * uint3(0xD37220E3u, 0x7AA2C2BDu, 0xE16BC89Du) +
             asuint(v.c2) * uint3(0x7AA07CD3u, 0xAF642BA9u, 0xA8F2213Bu)) + 0x9F3FDC37u);
 }
Example #6
0
 public static uint hash(int3x3 v)
 {
     return(csum(asuint(v.c0) * uint3(0x93C30C2Bu, 0xDCAF0351u, 0x6E050B01u) +
                 asuint(v.c1) * uint3(0x750FDBF5u, 0x7F3DD499u, 0x52EAAEBBu) +
                 asuint(v.c2) * uint3(0x4599C793u, 0x83B5E729u, 0xC267163Fu)) + 0x67BC9149u);
 }
Example #7
0
 public float3x3(int3x3 v)
 {
     this.c0 = v.c0;
     this.c1 = v.c1;
     this.c2 = v.c2;
 }
Example #8
0
 public static float3x3 float3x3(int3x3 v)
 {
     return(new float3x3(v));
 }