SQL PHP HTML ASP JavaScript articles and free scripts to download
 

Ceil Math function

We can get the ceiling of a number by using match ceil() function. Or by using ceil math function we can get the smallest integer that is greater than or equal to given number. So by using this we can get the next higher integer of a given number. Here is the syntax.

Math.ceil(number)

Let us try with some examples.

document.write (Math.ceil(11.257)); // output 12
document.write ("<br>----<br>");

document.write (Math.ceil(1.56)); // output 2
document.write ("<br>----<br>");


document.write (Math.ceil(-3.564)); // output -3
document.write ("<br>----<br>");


document.write (Math.ceil(-7.164)); // output -7
document.write ("<br>----<br>");

You can read the php math ceil function

Found anything wrong or wants to improve the code by adding more features? Post your short comment here or use the Forum



Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Join Our Email List
Email:  
For Email Newsletters you can trust
Math functions
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2013 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer