summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcadmic <cadmic24@gmail.com>2024-01-30 18:42:15 -0800
committerGitHub <noreply@github.com>2024-01-30 21:42:15 -0500
commit87a886df5ba8c8ddd70bccc74197aaaefaeb4bd8 (patch)
treeb7bcc819e3c34455f872101bcb70b00306f48f4b /src
parent8ae003b0d7de4c2f3ffba549aa41a731751948b3 (diff)
Match sys_math3d.c (#1674)
Diffstat (limited to 'src')
-rw-r--r--src/code/sys_math3d.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c
index 0e31d1e4c..3e50249b1 100644
--- a/src/code/sys_math3d.c
+++ b/src/code/sys_math3d.c
@@ -922,8 +922,7 @@ f32 Math3D_Plane(Plane* plane, Vec3f* pointOnPlane) {
* `nx`, `ny`, `nz`, and `originDist`
*/
f32 Math3D_UDistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p) {
-
- if (IS_ZERO(sqrtf(SQ(nx) + SQ(ny) + SQ(nz)))) {
+ if (OOT_DEBUG && IS_ZERO(sqrtf(SQ(nx) + SQ(ny) + SQ(nz)))) {
PRINTF(VT_COL(YELLOW, BLACK));
// "Math3DLengthPlaneAndPos(): Normal size is near zero %f %f %f"
PRINTF("Math3DLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n", nx, ny, nz);
@@ -1823,7 +1822,6 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) {
Vec3f cylIntersectCenter;
Vec3f midpointv0v1;
Vec3f diffMidpointIntersect;
- f32 distFromCylYIntersectTov0v1;
s32 pad;
cylBottom = (f32)cyl->pos.y + cyl->yShift;
@@ -1865,6 +1863,7 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) {
if (Math3D_TriChkLineSegParaYIntersect(&tri->vtx[0], &tri->vtx[1], &tri->vtx[2], tri->plane.normal.x,
tri->plane.normal.y, tri->plane.normal.z, tri->plane.originDist, cyl->pos.z,
cyl->pos.x, &yIntersect, cylBottom, cylTop)) {
+ f32 distFromCylYIntersectTov0v1;
cylIntersectCenter.x = cyl->pos.x;
cylIntersectCenter.y = yIntersect;
@@ -2145,8 +2144,10 @@ s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z) {
return false;
}
+#if OOT_DEBUG
void Math3D_DrawSphere(PlayState* play, Sphere16* sph) {
}
void Math3D_DrawCylinder(PlayState* play, Cylinder16* cyl) {
}
+#endif