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.