SHARE
TWEET

Untitled

a guest Jun 16th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top