From dd78faaf40862bd1552ec36c41374b527f747284 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 23 Feb 2024 03:08:52 -0800 Subject: Reorganize shell scripts into sh dir, consider in the future fsh will have different kinds of files --- sh/il | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 sh/il (limited to 'sh/il') diff --git a/sh/il b/sh/il new file mode 100755 index 0000000..7c75a71 --- /dev/null +++ b/sh/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