From b36460e477949e6f2acf8c35c445eba8f24eee51 Mon Sep 17 00:00:00 2001 From: mcDandy Date: Mon, 19 Jan 2026 20:43:35 +0100 Subject: [PATCH] fix lerp function --- more_math/Parser/UnifiedMathVisitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/more_math/Parser/UnifiedMathVisitor.py b/more_math/Parser/UnifiedMathVisitor.py index 0f1ef9e..0287ae5 100644 --- a/more_math/Parser/UnifiedMathVisitor.py +++ b/more_math/Parser/UnifiedMathVisitor.py @@ -429,7 +429,7 @@ class UnifiedMathVisitor(MathExprVisitor): if any(self._is_tensor(x) for x in [a, b, w]): # Lerp: a + w*(b-a) return torch.lerp(self._promote_to_tensor(a), self._promote_to_tensor(b), self._promote_to_tensor(w)) - return a + w * (b - a) + return a*(1-w)+b*w def visitSmoothstepFunc(self, ctx): x = self.visit(ctx.expr(0))