From: Pat Maddox Date: 2006-03-22T15:15:00+09:00 Subject: Round floats to N decimal places? I'm doing some math that results in floats with ~10 decimal places, but I'd like to round them to 2 places. Is there a built in way of doing this? Right now I'm doing format("%0.2f", the_float).to_f, which seems to work fine but it seems like an ugly way of doing it. Thanks, Pat