From e613ed6277f0c9be03755d0bcd552945a83d5545 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 25 Sep 2026 19:21:37 +0200 Subject: [PATCH] Fix a build break: float3.zero shadowed by math's own float3(...) method Inside the static math class, the unqualified name `float3` resolves to math's own `float3(float,float,float)` constructor-function first, not the CultMath.float3 type, so `float3.zero` fails to compile there (CS0119). No prior code in math.cs used the Type.zero static-field spelling from inside math itself for this reason. Switched cellular's zero vectors to `new float3(0.0f, 0.0f, 0.0f)`, which is unambiguous under `new`. Found by the first ygg-verify.sh build/test run on 3eed434. Co-Authored-By: Claude Sonnet 5 --- packages/cultmath/src/CultMath/math.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/cultmath/src/CultMath/math.cs b/packages/cultmath/src/CultMath/math.cs index 32d6afb1..21adfe46 100644 --- a/packages/cultmath/src/CultMath/math.cs +++ b/packages/cultmath/src/CultMath/math.cs @@ -718,8 +718,8 @@ public static partial class math var cell = floor(p); var f1 = 1.0e30f; var f2 = 1.0e30f; - var c1 = float3.zero; - var c2 = float3.zero; + var c1 = new float3(0.0f, 0.0f, 0.0f); + var c2 = new float3(0.0f, 0.0f, 0.0f); var hash1 = 0; for (var dz = -1; dz <= 1; dz++) @@ -747,8 +747,8 @@ public static partial class math } } - var grad1 = f1 > 0.0f ? (p - c1) / f1 : float3.zero; - var grad2 = f2 > 0.0f ? (p - c2) / f2 : float3.zero; + var grad1 = f1 > 0.0f ? (p - c1) / f1 : new float3(0.0f, 0.0f, 0.0f); + var grad2 = f2 > 0.0f ? (p - c2) / f2 : new float3(0.0f, 0.0f, 0.0f); return new CultCellular( new float4(grad1, f1),