Ensure a number is a factor of another number
<p>I need to ensure that values passed to one of my classes fit onto a grid with cells of 4px</p>

<p>So if 16 gets passed</p>

<pre><code>16%4==0 //this is fine
</code></pre>

<p>however</p>

<pre><code>17%4==1 //not ok
</code></pre>

<p>I need the program to convert the value to fit on the grid, so in the last case 17 would be converted to 16 (round down), if it were 19 it would get converted to 20 (round up) etc.</p>

<p>So is there a library that will do this for me?</p>
