Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to Round-Up

 
Kajol Shroff
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a small probelm ... all i need to do is to round up my double value .. which I get after some calculations..
How do I do that...
All I mean to say is if the output of the calculations is 1.2 it should give me output as 2 ...i.e. anything above 1.0 should be treated as 2...
PLease let me know.....
Kajol
 
java puneri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

use Math.ceil(doublevalue);

PuneGuy !
 
Kajol Shroff
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Puneri Java,
Thanks for your suggestion ...i will implement and let u know...
Just a curosity are u a puneite..tell me whats ur name...
Kajol
 
java puneri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi kajol :P
Hope Math.ceil(doubleVal) works for you !
:P
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic