title: Formatting a BigDecimal in Apache Velocity
body: <p>In my velocity templates, I've been using the Velocity <a href="http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/generic/NumberTool.html" rel="nofollow">NumberTool</a> to format number variables as a currency.
  Most of these are primitive doubles and they work fine with this tool.</p>
  
  <p>However, some are of type BigDecimal and they don't seem to be formatted at all.  It'll just show the expression as is when rendered:</p>
  
  <pre><code>$global.numberTool.currency($someBigDecimalVariable)
  </code></pre>
  
  <p>Is there a convenient way to format a BigDecimal with Velocity as a currency?  What are the alternatives?</p>