Try to use modulo method:
1.23.modulo(1) => 0.23
Read more here: http://www.ruby-doc.org/core-1.9.3/Numeric.html#method-i-modulo
Or you can convert float to integer and substract it from original float value.
1.23 - 1.23.to_i => 0.23
Try to use modulo method:
1.23.modulo(1) => 0.23
Read more here: http://www.ruby-doc.org/core-1.9.3/Numeric.html#method-i-modulo
Or you can convert float to integer and substract it from original float value.
1.23 - 1.23.to_i => 0.23