Open this page in the API Guide

MathHelper.ReverseLerp Method

Returns the linear interpolation parameter t for the value y.

Namespace:  Dundas.BI.Utility
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (25.1.0.1000)
Syntax
public static double ReverseLerp(
	double a,
	double b,
	double y
)

Parameters

a
Type: System.Double
The value to interpolate from.
b
Type: System.Double
The value to interpolate to.
y
Type: System.Double
The value to find the parameter for.

Return Value

Type: Double
Parameter for this interpolator that corresponds to y.
Remarks
Performs linear interpolation for values in the domain [0, 1] to the range [a, b]. That is, given the points (0, a) and (1, b) this solves for t in the point (t, y).
See Also