diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-08-08 21:51:30 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-08-08 21:51:30 -0400 |
| commit | 5802571a5680c65e2fcdd39bceac26d42f490d64 (patch) | |
| tree | 371d72242beb595fd0887c025846062cf7a75efa /src/d/d_bg_w.cpp | |
| parent | b24d8574cdef4f7e4521b2b0c72e0a8775706d9c (diff) | |
Add SQUARE macro to improve readibility for distances
Diffstat (limited to 'src/d/d_bg_w.cpp')
| -rw-r--r-- | src/d/d_bg_w.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/d/d_bg_w.cpp b/src/d/d_bg_w.cpp index 805d999b..24433c0f 100644 --- a/src/d/d_bg_w.cpp +++ b/src/d/d_bg_w.cpp @@ -50,8 +50,7 @@ bool dBgW::RwgWallCorrect(dBgS_Acch* pwi, u16 i_poly_idx) { if (!ChkPolyThrough(i_poly_idx, pwi->GetPolyPassChk())) { cBgW_TriElm* tri = &pm_tri[i_poly_idx]; - f32 sp68 = std::sqrtf(tri->m_plane.GetNP()->x * tri->m_plane.GetNP()->x + - tri->m_plane.GetNP()->z * tri->m_plane.GetNP()->z); + f32 sp68 = std::sqrtf(SQUARE(tri->m_plane.GetNP()->x) + SQUARE(tri->m_plane.GetNP()->z)); if (cM3d_IsZero(sp68)) { if (rwg_elm->next != 0xFFFF) { i_poly_idx = rwg_elm->next; |
