Function std::num::cast

pub fn cast<T: NumCast, U: NumCast>(n: T) -> U

Cast from one machine scalar to another

Example

let twenty: f32 = num::cast(0x14);
assert_eq!(twenty, 20f32);