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 <noreply@anthropic.com>
This commit is contained in:
parent
3eed434b31
commit
e613ed6277
1 changed files with 4 additions and 4 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Reference in a new issue