I have a floating point number that I want to truncate to 3 places but I don\'t want to round up.
For example, convert 1.0155555555555555 to 1.015
1.0155555555555555
1.015
Since ruby 2.4 Float#truncate method takes as an optional argument a number of decimal digits:
1.0155555555555555.truncate(3) # => 1.015