Trait IntoUnitInterval

Source
pub trait IntoUnitInterval {
    // Required method
    fn into_unit_interval(self) -> Result<UnitIntervalValue, ImagePyramidError>;
}
Expand description

A trait describing some floating-point type that can be converted to a unit-interval value (0.0 to 1.0, exclusive)

Required Methods§

Source

fn into_unit_interval(self) -> Result<UnitIntervalValue, ImagePyramidError>

Attempts to convert this value into a guaranteed unit-interval value.

Returns an error string if the value is not valid.

§Errors
  • The value is not within the unit range

Implementations on Foreign Types§

Source§

impl IntoUnitInterval for f32

Implementors§