diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-17 18:06:12 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-17 18:06:12 +1100 |
commit | faae6e715abd785393e7c2b5ed091236dcb2d637 (patch) | |
tree | 95b3ccb98358a2bb5300d00b0f46fcfcae90c31c /source/base | |
parent | 758a900e5149ff2cacc43ec1ed83d6b09f436ca0 (diff) |
fix minor interp bug
Diffstat (limited to 'source/base')
-rw-r--r-- | source/base/StarWorldGeometry.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/base/StarWorldGeometry.cpp b/source/base/StarWorldGeometry.cpp index 6fc676d..91ce8da 100644 --- a/source/base/StarWorldGeometry.cpp +++ b/source/base/StarWorldGeometry.cpp @@ -29,7 +29,7 @@ function<float(float, float, float)> WorldGeometry::xLerpFunction(Maybe<float> d unsigned xsize = m_size[0]; return [discontinuityThreshold, xsize](float offset, float min, float max) -> float { float distance = wrapDiffF<float>(max, min, xsize); - if (discontinuityThreshold && distance > *discontinuityThreshold) + if (discontinuityThreshold && abs(distance) > *discontinuityThreshold) return min + distance; return min + offset * distance; }; |