Logo

Programming-Idioms

  • Rust
  • Php

Idiom #79 Convert integer to floating point number

Declare the floating point number y and initialize it with the value of the integer x .

$y = (float) $x;
let y = x as f64;
Y : constant Float := Float (X);

New implementation...