LocationCalculateRatio Method
Calculate the ratio of the inter Location position in between the
start (sc) and end (ec) locations, such that
v = (1-ratio)*v_sc + ratio*v_ec
If inter is not in between sc and ec, ratio can be negative
or larger than one.
Namespace: DHI.Mike1D.GenericAssembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
public static double CalculateRatio(
ILocation startLocation,
ILocation endLocation,
ILocation inter
)
- startLocation ILocation
- Start location - usually chainage less than inter
- endLocation ILocation
- End location - usually chainage larger than inter
- inter ILocation
- Intermediate location.
DoubleThe ratio of the position between start and end location
if start and end location equals, 0.5 is returned.