diff options
author | Xiao Pan <xyz@flylightning.xyz> | 2024-11-12 14:32:52 -0800 |
---|---|---|
committer | Xiao Pan <xyz@flylightning.xyz> | 2024-11-12 14:32:52 -0800 |
commit | 898f9b87858bf54d49c0ef6db57341b9ae90bb28 (patch) | |
tree | 521ced052e7c1f9d826239299bbe042b754eb445 /sh/il | |
parent | fe442a6172d1f4d86fd62d0efae9f1b520eab59d (diff) |
il option to input scale and better comment about usage
Diffstat (limited to 'sh/il')
-rwxr-xr-x | sh/il | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,6 +1,6 @@ #!/bin/sh # InterpoLation -# x=$1, xa=$2, xb=$3, ya=$4, yb=$5 +# y=?, x=$1, xa=$2, xb=$3, ya=$4, yb=$5, scale=$6 # https://en.wikipedia.org/wiki/Interpolation#Linear_interpolation -echo "scale=4;$4+($5-$4)*($1-$2)/($3-$2)" | bc +echo "scale=${6:-4};$4+($5-$4)*($1-$2)/($3-$2)" | bc |