• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rounding

 
Rachel Kozlowski
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Khalid and Rolf:

I need to know a way to round a double to a percentage. I want anything that is greater than 5 rounded up and anything less rounded down.

Example: 92.5 should be 93% and
91.2 should be 91%.

Any Thoughts?
 
Mourouganandame Arunachalam
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check BigDecimal class .... clue: ROUND_HALF_UP

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic