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 int2x2 int2x2(double2x2 v) { return(new int2x2(v)); }
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 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 double2x2 transpose(double2x2 v) { return(double2x2( v.c0.x, v.c0.y, v.c1.x, v.c1.y)); }
public static float2x2 float2x2(double2x2 v) { return(new float2x2(v)); }
public float2x2(double2x2 v) { this.c0 = (float2)v.c0; this.c1 = (float2)v.c1; }