diff --git a/src/Unity.Mathematics.CodeGen~/VectorGenerator.cs b/src/Unity.Mathematics.CodeGen~/VectorGenerator.cs index a6c203b3..8a0e97e1 100644 --- a/src/Unity.Mathematics.CodeGen~/VectorGenerator.cs +++ b/src/Unity.Mathematics.CodeGen~/VectorGenerator.cs @@ -1482,7 +1482,7 @@ public void GenerateFastInverseFunction(StringBuilder str) {0}4 c2 = m.c2; {0}4 pos = m.c3; - {0}4 zero = {0}4(0); + {0}4 zero = {0}4({1}); {0}4 t0 = unpacklo(c0, c2); {0}4 t1 = unpacklo(c1, zero); @@ -1494,7 +1494,7 @@ public void GenerateFastInverseFunction(StringBuilder str) {0}4 r2 = unpacklo(t2, t3); pos = -(r0 * pos.x + r1 * pos.y + r2 * pos.z); - pos.w = 1.0f; + pos.w = {2}; return {0}4x4(r0, r1, r2, pos); }} diff --git a/src/Unity.Mathematics/double4x4.gen.cs b/src/Unity.Mathematics/double4x4.gen.cs index 1380a77f..620b448f 100644 --- a/src/Unity.Mathematics/double4x4.gen.cs +++ b/src/Unity.Mathematics/double4x4.gen.cs @@ -757,7 +757,7 @@ public static double4x4 fastinverse(double4x4 m) double4 c2 = m.c2; double4 pos = m.c3; - double4 zero = double4(0); + double4 zero = double4(0.0); double4 t0 = unpacklo(c0, c2); double4 t1 = unpacklo(c1, zero); @@ -769,7 +769,7 @@ public static double4x4 fastinverse(double4x4 m) double4 r2 = unpacklo(t2, t3); pos = -(r0 * pos.x + r1 * pos.y + r2 * pos.z); - pos.w = 1.0f; + pos.w = 1.0; return double4x4(r0, r1, r2, pos); } diff --git a/src/Unity.Mathematics/float4x4.gen.cs b/src/Unity.Mathematics/float4x4.gen.cs index 061cc0c5..8846c991 100644 --- a/src/Unity.Mathematics/float4x4.gen.cs +++ b/src/Unity.Mathematics/float4x4.gen.cs @@ -757,7 +757,7 @@ public static float4x4 fastinverse(float4x4 m) float4 c2 = m.c2; float4 pos = m.c3; - float4 zero = float4(0); + float4 zero = float4(0.0f); float4 t0 = unpacklo(c0, c2); float4 t1 = unpacklo(c1, zero);