We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e4d648 commit c009a03Copy full SHA for c009a03
1 file changed
math.gs
@@ -57,6 +57,9 @@
57
# Linearly interpolate between `A` and `B` by `T`.
58
%define LERP(A,B,T) ((A)+((B)-(A))*(T))
59
60
+# Work out the ratio of `VAL` from `A` to `B`.
61
+%define INVLERP(VAL,A,B) ((VAL) - (A)) / ((B) - (A))
62
+
63
# Re-maps a `V` from the range `A` to `B` to the range `C` to `D`.
64
%define MAP(A,B,C,D,V) (((V)-(B))*((D)-(C))/((A)-(B))+(C))
65
0 commit comments