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.Generic
Assembly:
DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax public static double CalculateRatio(
ILocation startLocation,
ILocation endLocation,
ILocation inter
)
Public Shared Function CalculateRatio (
startLocation As ILocation,
endLocation As ILocation,
inter As ILocation
) As Double
public:
static double CalculateRatio(
ILocation^ startLocation,
ILocation^ endLocation,
ILocation^ inter
)
Parameters
- startLocation
- Type: DHI.Mike1D.GenericILocation
Start location - usually chainage less than inter - endLocation
- Type: DHI.Mike1D.GenericILocation
End location - usually chainage larger than inter - inter
- Type: DHI.Mike1D.GenericILocation
Intermediate location.
Return Value
Type:
DoubleThe ratio of the position between start and end location
Remarks
if start and end location equals, 0.5 is returned.
See Also