title: Rounding up to the nearest 0.05 in JavaScript
body: <p><strong>Question</strong><br>
  Does anyone know of a way to round a float to the nearest 0.05 in JavaScript?</p>
  
  <p><strong>Example</strong>  </p>
  
  <pre><code>BEFORE | AFTER
    2.51 | 2.55
    2.50 | 2.50
    2.56 | 2.60
  </code></pre>
  
  <p><strong>Current Code</strong></p>
  
  <pre><code>var _ceil = Math.ceil;
  Math.ceil = function(number, decimals){
      if (arguments.length == 1)
      return _ceil(number);
  
      multiplier = Math.pow(10, decimals);
      return _ceil(number * multiplier) / multiplier;
  }
  </code></pre>
  
  <p>Then elsewhere... 
  <code>return (Math.ceil((amount - 0.05), 1) + 0.05).toFixed(2);</code></p>
  
  <p>Which is resulting in...</p>
  
  <pre><code>BEFORE | AFTER
    2.51 | 2.55
    2.50 | 2.55
    2.56 | 2.65
  </code></pre>