public static double determinant(double2x2 m) { double a = m.c0.x; double b = m.c1.x; double c = m.c0.y; double d = m.c1.y; return(a * d - b * c); }
public static double2x2 inverse(double2x2 m) { double a = m.c0.x; double b = m.c1.x; double c = m.c0.y; double d = m.c1.y; double det = a * d - b * c; return(double2x2(d, -b, -c, a) * (1.0 / det)); }
public static uint2x2 uint2x2(double2x2 v) { return(new uint2x2(v)); }
public uint2x2(double2x2 v) { this.c0 = (uint2)v.c0; this.c1 = (uint2)v.c1; }
public static uint2 hashwide(double2x2 v) { return((fold_to_uint(v.c0) * uint2(0x5B419C01u, 0x515D90F5u) + fold_to_uint(v.c1) * uint2(0xEC9F68F3u, 0xF9EA92D5u)) + 0xC2FAFCB9u); }
public static uint hash(double2x2 v) { return(csum(fold_to_uint(v.c0) * uint2(0xA47EC335u, 0xA477DF57u) + fold_to_uint(v.c1) * uint2(0xC4B1493Fu, 0xBA0966D3u)) + 0xAFBEE253u); }
public static double2x2 transpose(double2x2 v) { return(double2x2( v.c0.x, v.c0.y, v.c1.x, v.c1.y)); }
public static uint2 hashwide(double2x2 v) { return((fold_to_uint(v.c0) * uint2(0xE99ED6F3u, 0x48125549u) + fold_to_uint(v.c1) * uint2(0xEEE2123Bu, 0xE3AD9FE5u)) + 0xCE1CF8BFu); }
public static int2x2 int2x2(double2x2 v) { return(new int2x2(v)); }
public static uint hash(double2x2 v) { return(csum(fold_to_uint(v.c0) * uint2(0xA2D00EDFu, 0xA8977779u) + fold_to_uint(v.c1) * uint2(0x9F1C739Bu, 0x4B1BD187u)) + 0x9DF50593u); }
public static uint hash(double2x2 v) { return(csum(fold_to_uint(v.c0) * uint2(0xFD80290Bu, 0x8B65ADB7u) + fold_to_uint(v.c1) * uint2(0xDFF4F563u, 0x7069770Du)) + 0xD1224537u); }
public static float2x2 float2x2(double2x2 v) { return(new float2x2(v)); }
public float2x2(double2x2 v) { this.c0 = (float2)v.c0; this.c1 = (float2)v.c1; }
public static uint hash(double2x2 v) { return(csum(fold_to_uint(v.c0) * uint2(0x863E3729u, 0xE191B035u) + fold_to_uint(v.c1) * uint2(0x68586FAFu, 0xD4DFF6D3u)) + 0xCB634F4Du); }
public static uint2 hashwide(double2x2 v) { return((fold_to_uint(v.c0) * uint2(0xFAB9913Fu, 0xB4501269u) + fold_to_uint(v.c1) * uint2(0xE04B89FDu, 0xDB3DE101u)) + 0x7B6D1B4Bu); }
public static uint hash(double2x2 v) { return(csum(fold_to_uint(v.c0) * uint2(0x48125549u, 0xEEE2123Bu) + fold_to_uint(v.c1) * uint2(0xE3AD9FE5u, 0xCE1CF8BFu)) + 0x7BE39F3Bu); }