JavaScript Math Object

Source: Internet
Author: User

Math.PI This value is approximately 3.141592653589793.

Math.ceil (x) rounding up

Math.floor (x) rounding down

Math.pow (x, y) returns the Y power of X (Note: If the result is an imaginary or negative number, the method returns NaN.) If a floating-point overflow is caused by an exponent that is too large, the method returns Infinity. )

......

Note: The Math object is not a class of objects like Date and String, so there is no constructor for math (), a function like Math.sin () is just a function, not a method of an object. You do not have to create it, and you can invoke all of its properties and methods by using Math as an object.

Via http://www.w3school.com.cn/jsref/jsref_obj_math.asp

JavaScript Math Object

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.