======Programming - ColdFusion - Snippets - roundBetter====== A better round function taken from [[http://jamiekrug.com/blog/index.cfm/2009/2/12/ColdFusion-round-function-bug-when-operation-performed-on-argument|Jamie Krug's ColdFusion Blog - ColdFusion round() function bug when operation performed on argument]] var result = arguments.toRound; var scaleMultiplier = 10^arguments.scale; result = result * scaleMultiplier; result = round(javaCast('string', result) ); result = javaCast('string', result/scaleMultiplier); return result;