Answers for "how float value is converted to intezer in ruby"

-1

convert float to int ruby

Try Float.round.

irb(main):001:0> 5.44.round
=> 5
irb(main):002:0> 5.54.round
=> 6
Posted by: Guest on March-22-2021

Code answers related to "how float value is converted to intezer in ruby"

Browse Popular Code Answers by Language