Function cast
pub fn cast<T: NumCast, U: NumCast>(n: T) -> Option<U>
Cast from one machine scalar to another.
Examples
# use num_traits as num;
let twenty: f32 = num::cast(0x14).unwrap();
assert_eq!(twenty, 20f32);
castpub fn cast<T: NumCast, U: NumCast>(n: T) -> Option<U>
Cast from one machine scalar to another.
# use num_traits as num;
let twenty: f32 = num::cast(0x14).unwrap();
assert_eq!(twenty, 20f32);