diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-04-23 22:42:08 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-04-25 22:44:42 -0700 |
commit | c8133a6a33939c8dca1f54434c28e7d7330a50eb (patch) | |
tree | 8de5ecd7de85264aef47b39fd9c6433031cc2d74 /home/xyz/.local | |
parent | 7dffca5d3b7dd32b47084553b7dc91805ed1c6de (diff) |
il
Diffstat (limited to 'home/xyz/.local')
-rwxr-xr-x | home/xyz/.local/bin/il | 6 |
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 |