Web Analytics Made Easy -
StatCounter rounding up - CodingForum

Announcement

Collapse
No announcement yet.

rounding up

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • rounding up

    Hello,

    I have varible page_num which is:
    double page_num = (double) rows/ (double) 2;
    I want it to round up (ceil) to the next number... ie 2.4=3, 2.1=3, 2.6=3. How do I do that??

    Thank you in advance..

    Tony
    Last edited by ynotlim; Oct 2, 2006, 06:44 PM.
    ---------
    Client / Server Side Programmer II

  • #2
    nevermind... got it

    page_num = Math.ceil((double) rows/ (double) 2);

    Tony
    ---------
    Client / Server Side Programmer II

    Comment


    • #3
      In the future make sure you mention which language you are using when asking for help.
      OracleGuy

      Comment

      Working...
      X