title: Truncating Actionscript Number
body: <p>I have a number in actionscript, arrived at via some arbitrary math:</p>
  
  <pre><code>var value:Number = 45 * (1 - (1 /3));
  trace(value);//30.00000000004
  </code></pre>
  
  <p>Now, I would like to take the ceiling of this number, except in cases where the amount it is greater than the next lower integer is smaller than some epsilon. In the above example, I really want to round to 30, but only in the case where I know I'm getting a rounding error:</p>
  
  <pre><code>Math.ceil(value); //I want 30, but get 31
  Math.ceil(30.1);  //In this case, it's reasonable to get 31
  </code></pre>
  
  <p>Is there an elegant way to truncate a Number in actionscript? Or easily discard any part of the number that is less than some epsilon?</p>