Re: rounding numbers up

From: Ryan Stewart (zzanNOtozz_at_gSPAMo.com)
Date: 02/26/04


Date: Wed, 25 Feb 2004 20:18:43 -0600


"trs1800" <nolo@coo.ca> wrote in message
news:I1b%b.1217$as.93@fe2.texas.rr.com...
> i tryed searching on this on google but i didnt find anything like i
> wanted, how do i round a number up, like 1.39 to 2?
>
> Thanks paul

I'm not aware of any standard methods that will do this for you. All you
have to do though is add 0.5 and then use Math.round(). Alternately, add 1
and use Math.floor(), cutting out the middleman as Math.round() adds 0.5 and
calls Math.floor().



Relevant Pages

  • Re: rounding numbers up
    ... >> i tryed searching on this on google but i didnt find anything like i ... >> Thanks paul ...
    (comp.lang.java)
  • Re: What did I get myself into?-conclusion
    ... Congrats on the gig. ... I was sweating blood for you. ... Paul wrote: ... great music that I didnt know about. ...
    (rec.music.makers.guitar.jazz)
  • Re: What did I get myself into?-conclusion
    ... Paul wrote: ... like Joey said, the Bass player wasn't just playing ... consisted in hitting the chords on the downbeats, ... great music that I didnt know about. ...
    (rec.music.makers.guitar.jazz)
  • Re: Google acting strange ?
    ... >Paul B wrote: ... google has gone ga-ga. ... >I have also notice caps vs non caps oddities also. ...
    (alt.internet.search-engines)
  • Re: "Help me . . . my car doors wont unlock."
    ... I have at least mastered the basics of Google and as ... BMW and your inability to fathom your own car's central locking facility. ... When I unlock via the remote key, the Central locking only unlocks drivers ... Paul " ...
    (alt.guitar)