From 0876875c59282d52727abdefbb127173df9f5434 Mon Sep 17 00:00:00 2001 From: mcDandy Date: Fri, 19 Dec 2025 23:05:06 +0100 Subject: [PATCH] Make smoothstep consistent --- more_math/Parser/FloatEvalVisitor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/more_math/Parser/FloatEvalVisitor.py b/more_math/Parser/FloatEvalVisitor.py index ae0b5bf..586e8d3 100644 --- a/more_math/Parser/FloatEvalVisitor.py +++ b/more_math/Parser/FloatEvalVisitor.py @@ -170,9 +170,9 @@ class FloatEvalVisitor(MathExprVisitor): return a + (b - a) * w def visitSmoothstepFunc(self, ctx): - edge0 = self.visit(ctx.expr(0)) - edge1 = self.visit(ctx.expr(1)) - x = self.visit(ctx.expr(2)) + x = self.visit(ctx.expr(0)) + edge0 = self.visit(ctx.expr(1)) + edge1 = self.visit(ctx.expr(2)) # Scale, bias and saturate x to 0..1 range t = (x - edge0) / (edge1 - edge0)