JRS: In article <40*************@news.ntlworld.com>, seen in
news:comp.lang.javascript, Trevor Stapleton <tw*****@ntlworld.com>
posted at Mon, 14 Jun 2004 16:28:41 :
On Mon, 14 Jun 2004 16:47:01 +0200, Vincent van Beveren
<vi*****@provident.remove.this.nl> wrote:
but the thing you are looking for is Math.ceil(2.5);
Thanks for the info Vincent, may I ask do you know of
an alternative to using document.write and so avoid
opening a new page when the function containing
it is called?
Try reading the FAQ.
As regards your rounding, it depends on what you mean by "up".
Math.ceil(X) will round X towards plus infinity; if you want to round X
away from zero then maybe X<0 ? -Math.ceil(-X) : Math.ceil(X)
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> JL / RC : FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.