public static uint hash(this float5x4 v) { return(math.csum(math.asuint(v.c0) * math.uint4(0xC4B1493Fu, 0xBA0966D3u, 0xAFBEE253u, 0x5B419C01u) + math.asuint(v.c1) * math.uint4(0x515D90F5u, 0xEC9F68F3u, 0xF9EA92D5u, 0xC2FAFCB9u) + math.asuint(v.c2) * math.uint4(0x616E9CA1u, 0xC5C5394Bu, 0xCAE78587u, 0x7A1541C9u) + math.asuint(v.c3) * math.uint4(0xF83BD927u, 0x6A243BCBu, 0x509B84C9u, 0x91D13847u) + math.asuint(v.c4) * math.uint4(0x52F7230Fu, 0xCF286E83u, 0xE121E6ADu, 0xC9CA1249u)) + 0x69B60C81u); }
public static float5x4 Scale4x4(this float5x4 a, float3 b) { return(new float5x4(float4x4.TRS(a.Position(), a.Rotation(), a.Scale() * b), a.c4)); }
public static float3 Right(this float5x4 m) { return(new float3(m.c0[0], m.c0[1], m.c0[2])); }
public static float3 Up(this float5x4 m) { return(new float3(m.c1[0], m.c1[1], m.c1[2])); }
public static float3 Forward(this float5x4 m) { return(new float3(m.c2[0], m.c2[1], m.c2[2])); }
public static float3 Scale(this float5x4 m) { return(new float3(math.length(m.c0), math.length(m.c1), math.length(m.c2))); }
public static quaternion Rotation(this float5x4 m) { return(quaternion.LookRotationSafe(m.Forward(), m.Up())); }
public static float3 Position(this float5x4 m) { return(new float3(m.c3[0], m.c3[1], m.c3[2])); }