fix lerp function

This commit is contained in:
mcDandy
2026-01-19 20:43:35 +01:00
parent b59937d351
commit b36460e477
+1 -1
View File
@@ -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))