summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhome/xyz/.local/bin/il6
1 files changed, 6 insertions, 0 deletions
diff --git a/home/xyz/.local/bin/il b/home/xyz/.local/bin/il
new file mode 100755
index 00000000..7c75a710
--- /dev/null
+++ b/home/xyz/.local/bin/il
@@ -0,0 +1,6 @@
+#!/bin/sh
+# InterpoLation
+
+# x=$1, xa=$2, xb=$3, ya=$4, yb=$5
+# https://en.wikipedia.org/wiki/Interpolation#Linear_interpolation
+echo "scale=4;$4+($5-$4)*($1-$2)/($3-$2)" | bc