This commit is contained in:
Branimir Karadžić
2026-01-22 21:32:24 -08:00
committed by GitHub
parent ef9c17cf3d
commit 0e7d969a8a

View File

@@ -397,13 +397,13 @@ namespace bx
bottom.normal.z = zw - zy; bottom.normal.z = zw - zy;
bottom.dist = ww - wy; bottom.dist = ww - wy;
Plane* plane = _result;
for (uint32_t ii = 0; ii < 6; ++ii) for (uint32_t ii = 0; ii < 6; ++ii)
{ {
const float invLen = 1.0f/length(plane->normal); Plane& plane = _result[ii];
plane->normal = normalize(plane->normal);
plane->dist *= invLen; const float invLen = divSafe(1.0f, length(plane.normal) );
++plane; plane.normal = mul(plane.normal, invLen);
plane.dist *= invLen;
} }
} }