summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Warden <nathan@nathanwarden.com>2018-06-24 17:52:17 -0500
committerNathan Warden <nathan@nathanwarden.com>2018-06-24 17:52:17 -0500
commitc2315e3291d2ae264a49c1ee30ea9b024d2d0427 (patch)
tree00fc77e2cdee9e399e69dfd5d9ed068d87bf1378
parent25275de50e31aa081cdefe0c8b3b76b6389cb6a6 (diff)
downloadredot-engine-c2315e3291d2ae264a49c1ee30ea9b024d2d0427.tar.gz
Lerp now consistent with Godot API. InverseLerp fixed.
-rw-r--r--modules/mono/glue/cs_files/Mathf.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mono/glue/cs_files/Mathf.cs b/modules/mono/glue/cs_files/Mathf.cs
index 0d20a12563..1ed2889833 100644
--- a/modules/mono/glue/cs_files/Mathf.cs
+++ b/modules/mono/glue/cs_files/Mathf.cs
@@ -150,7 +150,7 @@ namespace Godot
public static real_t InverseLerp(real_t from, real_t to, real_t weight)
{
- return (Clamp(weight, 0f, 1f) - from) / (to - from);
+ return (weight - from) / (to - from);
}
public static bool IsInf(real_t s)
@@ -165,7 +165,7 @@ namespace Godot
public static real_t Lerp(real_t from, real_t to, real_t weight)
{
- return from + (to - from) * Clamp(weight, 0f, 1f);
+ return from + (to - from) * weight;
}
public static real_t Log(real_t s)