From faae6e715abd785393e7c2b5ed091236dcb2d637 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 17 Mar 2024 18:06:12 +1100 Subject: [PATCH] fix minor interp bug --- source/base/StarWorldGeometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 WorldGeometry::xLerpFunction(Maybe d unsigned xsize = m_size[0]; return [discontinuityThreshold, xsize](float offset, float min, float max) -> float { float distance = wrapDiffF(max, min, xsize); - if (discontinuityThreshold && distance > *discontinuityThreshold) + if (discontinuityThreshold && abs(distance) > *discontinuityThreshold) return min + distance; return min + offset * distance; };