Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #[cfg(feature="f64")]
  2. type Float = f64;
  3.  
  4. #[cfg(not(feature="f64"))]
  5. type Float = f32;
  6.  
  7. fn take_float(f: Float) -> Float {
  8. f
  9. }
  10.  
  11. fn main() {
  12. println!("Float value is {}", take_float(5.0));
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement