From f11f5c2218bc63ba0e990cd5bcf86809493b9ada Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Sun, 23 Apr 2023 22:42:08 -0700 Subject: il --- home/xyz/.local/bin/il | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 home/xyz/.local/bin/il (limited to 'home') 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 -- cgit v1.2.3-70-g09d2