Skip to main content

extract_float_arg

Function extract_float_arg 

Source
pub fn extract_float_arg(
    args: &[ValueWord],
    index: usize,
    fn_name: &str,
) -> Result<f64, String>
Expand description

Extract an f64 argument at index from args.

Returns the f64 value on success, or an error string naming fn_name and the position. Accepts both f64 and i64 values (the latter is widened to f64).