Add SQUARE macro to improve readibility for distances

This commit is contained in:
LagoLunatic
2025-08-08 21:51:30 -04:00
parent b24d8574cd
commit 5802571a56
37 changed files with 107 additions and 106 deletions
+1 -2
View File
@@ -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;