Browse Source

lerp operator order switched

Josh Wilson 19 years ago
parent
commit
b9a2b0648d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/showbase/PythonUtil.py

+ 1 - 1
direct/src/showbase/PythonUtil.py

@@ -1459,7 +1459,7 @@ def lerp(v0, v1, t):
     returns a value lerped between v0 and v1, according to t
     returns a value lerped between v0 and v1, according to t
     t == 0 maps to v0, t == 1 maps to v1
     t == 0 maps to v0, t == 1 maps to v1
     """
     """
-    return v0 + (t * (v1 - v0))
+    return v0 + ((v1 - v0) * t)
 
 
 def average(*args):
 def average(*args):
     """ returns simple average of list of values """
     """ returns simple average of list of values """