Last Updated: February 25, 2016
·
471
· ktusznio

Rounding to the nearest hundred

Ruby's round method can consume negative precisions:

n.round(-2)

In this case -2 gets you rounding to the nearest hundred.