title: Lua: Rounding numbers and then truncate
body: <p>Which is the best efficient way to round up a number and then truncate it (remove decimal places after rounding up)?</p>
  
  <p>for example if decimal is above 0.5 (that is, 0.6, 0.7, and so on), I want to round up and then truncate (case 1). Otherwise, I would like to truncate (case 2)</p>
  
  <pre><code>for example:
  232.98266601563 =&gt; after rounding and truncate = 233 (case 1)
  232.49445450000 =&gt; after rounding and truncate = 232 (case 2)
  232.50000000000 =&gt; after rounding and truncate = 232 (case 2)
  </code></pre>