summaryrefslogtreecommitdiff
path: root/home/xyz/.local
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-04-23 22:42:08 -0700
committerXiao Pan <gky44px1999@gmail.com>2023-04-25 22:44:42 -0700
commitc8133a6a33939c8dca1f54434c28e7d7330a50eb (patch)
tree8de5ecd7de85264aef47b39fd9c6433031cc2d74 /home/xyz/.local
parent7dffca5d3b7dd32b47084553b7dc91805ed1c6de (diff)
il
Diffstat (limited to 'home/xyz/.local')
-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