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_magma.cpp | |
| parent | b24d8574cdef4f7e4521b2b0c72e0a8775706d9c (diff) | |
Add SQUARE macro to improve readibility for distances
Diffstat (limited to 'src/d/d_magma.cpp')
| -rw-r--r-- | src/d/d_magma.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/d/d_magma.cpp b/src/d/d_magma.cpp index e24e8c05..e438be27 100644 --- a/src/d/d_magma.cpp +++ b/src/d/d_magma.cpp @@ -89,9 +89,9 @@ void dMagma_ball_c::draw() { BOOL dMagma_ball_c::rangeCheck(cXyz& pos, f32* dst) { f32 distSq = mPos.abs2XZ(pos); f32 rad1 = mScale * 243.6414f; - if (distSq < rad1*rad1) { + if (distSq < SQUARE(rad1)) { f32 rad2 = mScale * 800.0f; - f32 dist = std::sqrtf(rad2 * rad2 - distSq); + f32 dist = std::sqrtf(SQUARE(rad2) - distSq); f32 temp = (mPos.y - (rad2 - 47.999146f)); temp += dist; *dst = temp; |
