Skip to main content

elevation_height

Function elevation_height 

Source
pub fn elevation_height(
    law: &ElevationLaw,
    distance: f64,
) -> Result<f64, GeomError>
Expand description

Height at plan distance distance, for every law in the family.

Closed-form laws answer through ElevationLaw::height_at; an ElevationLaw::Intrinsic piece, alone or inside a ElevationLaw::Piecewise, is integrated and inverted as the module documentation states.

§Errors

GeomError::InvalidInput for a non-finite distance, a malformed law, a distance outside a law’s domain (past the vertical of a circular arc, before the start of an intrinsic profile, or past where it turns vertical), and GeomError::BudgetExceeded when the below-vertical certificate or the inversion does not settle within its budget.