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 -1
View File
@@ -2218,7 +2218,7 @@ static BOOL daBb_Execute(bb_class* i_this) {
f32 yDiff = (player->current.pos.y + 100.0f) - i_this->actor.current.pos.y;
f32 zDiff = player->current.pos.z - i_this->actor.current.pos.z;
i_this->unk_33C = std::sqrtf(xDiff * xDiff + zDiff * zDiff);
i_this->unk_33C = std::sqrtf(SQUARE(xDiff) + SQUARE(zDiff));
i_this->unk_336 = cM_atan2s(xDiff, zDiff);
i_this->unk_338 = -cM_atan2s(yDiff, i_this->unk_33C);