Modify floor/ceiling function to work with numbers other than 1?
<p>By default the floor function always rounds down and the ceil function always rounds up to the nearest '1'</p>

<p>How would I round down/up to the nearest 20, or the nearest 1,000?</p>

<p>Say I had a number x and a factor y.</p>

<p>I want to find the closest factor of y to x.</p>

<p>I am using this to find maximum and minimum values for a graph. Thanks.</p>
