inverseInterpolate MethodStatic
For a line f(x)
where f(x0) = f0
and f(x1) = f1
, return the x
value at which f(x) = fTarget
.
Return defaultResult
if (fTarget - f0) / (f1 - f0)
exceeds largeFractionResult.
inverseInterpolate(x0: number, f0: number, x1: number, f1: number, fTarget: number0, defaultResult?: number): undefined | number
Parameter | Type | Description |
---|---|---|
x0 | number | |
f0 | number | |
x1 | number | |
f1 | number | |
fTarget | number | |
defaultResult | number |
Returns - undefined | number
Defined in
- Geometry.ts Line 1088
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.