Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Making precisions in calculations with JSTL

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys! I'm having rounding off issues. Are there any equivalent of the Math class methods ceil, round and floor? It seems that fmt:number only outputs to a String. What if I still have to use it in my calculations? Last time I tried, fmt:number doesn't even accept an expressions ${} as a value! Any ideas guys?

Here is my code. The variables factor and percentage needs to be rounded off to the nearest integer during calculation.

 
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!