Function tract_hir::prelude::tract_num_traits::cast::cast    [−][src]
pub fn cast<T, U>(n: T) -> Option<U> where
    T: NumCast,
    U: NumCast, Expand description
Cast from one machine scalar to another.
Examples
let twenty: f32 = num::cast(0x14).unwrap();
assert_eq!(twenty, 20f32);