pub fn inv_linear(&self, i: f32) -> f32 {
        let p = (i - self.range.start) / (self.range.end - self.range.start);
        let d = self.domain.start + p * (self.domain.end - self.domain.start);

        let d = d.max(self.domain.start);
        let d = d.min(self.domain.end);
        d
    }
/// Translates value from range to domain scale.
/// ```
/// # extern crate textplots;
/// # use textplots::scale::Scale;
/// assert_eq!(5.5, Scale::new(0_f32..10_f32, -1_f32..1_f32).inv_linear(0.1));
/// ```
Translates value from range to domain scale.
Translates value from range to domain scale .
pub fn inv_linear(&self, i: f32) -> f32 {
        let p = (i - self.range.start) / (self.range.end - self.range.start);
        let d = self.domain.start + p * (self.domain.end - self.domain.start);
        let d = d.max(self.domain.start);
        let d = d.min(self.domain.end);
        d
    }
pub fn inv_linear ( & self , i : f32 ) -> f32 { let p = ( i - self . range . start ) / ( self . range . end - self . range . start ) ; let d = self . domain . start + p * ( self . domain . end - self . domain . start ) ; let d = d . max ( self . domain . start ) ; let d = d . min ( self . domain . end ) ; d }
Translates value from range to domain scale.
Translates value from range to domain scale .
&self
i
f32
&self
i
f32
extern crate textplots;
None
use textplots::scale::scale;
None