JavaScript Learning notes first week math

Source: Internet
Author: User

Javascript first week

math is commonly used Method

1 , parseint ()

Rounding: Takes the integer at the front of the string and returns

2 , Math.ceil ()

Rounding up: A decimal number adds 1 to the integer part

3 , Math.Round ()

Rounded

4 , Math.floor ()

Rounding down

5 , Math.Abs ()

The absolute value of the return number

Math's Method

Math.Abs (): Calculates the absolute value.

Math.acos (): Calculates the inverse cosine value.

Math.asin (): Calculates the inverse chord value.

Math.atan (): Calculates the inverse tangent value.

Math.atan2 (): Calculates the angle from the x-axis to a point.

Math.ceil (): On a number.

Math.Cos (): Calculates the cosine value.

Math.exp (): Calculates the exponent of E.

Math.floor (): Rounds to a number.

Math.log (): Calculates the natural logarithm.

Math.max (): Returns the larger of two numbers.

Math.min (): Returns the smaller of the two numbers.

Math.pow (): Calculates the Y-side of X.

Math.random (): Calculates a random number.

Math.Round (): Rounds to the nearest integer.

Math.sin (): Calculates the sine value.

MATH.SQRT (): Calculates the square root.

Math.tan (): Calculates the tangent value.

JavaScript Learning notes first week math

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.