As a beginner's mathematical function--math class

Source: Internet
Author: User
Tags integer natural logarithm rounds square root
Function

Recently always used some friends to ask some mathematical formula, said that these content will not, so here to open a basic tutorial, hope to be able to help everyone's study.

In Flash, the math class is a very common class, through mathematical calculation, can achieve a lot of very wonderful effects, we are here from the most basic learning, to fill the mathematical knowledge.

Let's look at the math classes available in Flash:

Math.Abs () calculates the absolute value.
Math.acos () calculates the inverse cosine value.
Math.asin () calculates the inverse chord value.
Math.atan () calculates the tangent value.
Math.atan2 () calculates the angle from the X axis to the point.
Math.ceil () rounds the number up to the nearest integer.
Math.Cos () calculates the cosine value.
Math.exp () calculates the exponential value.
Math.floor () rounds the number down to the nearest integer.
Math.log () calculates the natural logarithm.
Math.max () returns the larger of two integers.
Math.min () returns the smaller of two integers.
Math.pow () calculates the y-square of X.
Math.random () returns a pseudo random number between 0.0 and 1.0.
Math.Round () is rounded to the nearest integer.
Math.sin () calculates the sine value.
MATH.SQRT () calculates the square root.
Math.tan () calculates the tangent value.



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.