pub fn to_f64(&self) -> f64 {
        match self {
            Self::True => 1.0,
            Self::Integer(i) => *i as f64,
            Self::Float(f) => *f,
            Self::Str(s) => {
                // todo: JavaScript-style parseFloat-like behavior?
                match s.parse::<f64>() {
                    Ok(f) => f,
                    Err(_) => 0.0,
                }
            }
            _ => 0.0,
        }
    }
/// Get value's float representation.
Get value's float representation.
Get value ' s float representation .
pub fn to_f64(&self) -> f64 {
        match self {
            Self::True => 1.0,
            Self::Integer(i) => *i as f64,
            Self::Float(f) => *f,
            Self::Str(s) => {
                // todo: JavaScript-style parseFloat-like behavior?
                match s.parse::<f64>() {
                    Ok(f) => f,
                    Err(_) => 0.0,
                }
            }
            _ => 0.0,
        }
    }
pub fn to_f64 ( & self ) -> f64 { match self { Self :: True => 1.0 , Self :: Integer ( i ) => * i as f64 , Self :: Float ( f ) => * f , Self :: Str ( s ) => { // todo: JavaScript-style parseFloat-like behavior? match s . parse :: < f64 > ( ) { Ok ( f ) => f , Err ( _ ) => 0.0 , } } _ => 0.0 , } }
Get value's float representation.
Get value ' s float representation .
&self
&self