Step 8
This commit is contained in:
parent
fc66ac0082
commit
3de54bee23
7
src/utility/lib/Functions.re
Normal file
7
src/utility/lib/Functions.re
Normal file
|
@ -0,0 +1,7 @@
|
|||
let interpolate =
|
||||
(xMin: float, xMax: float, yMin: float, yMax: float, xIntended: float)
|
||||
: float => {
|
||||
let minProportion = (xMax -. xIntended) /. (xMax -. xMin);
|
||||
let maxProportion = (xIntended -. xMin) /. (xMax -. xMin);
|
||||
yMin *. minProportion +. yMax *. maxProportion;
|
||||
};
|
Loading…
Reference in New Issue
Block a user