
Math Object
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
600
|
ActionScript Language Reference
Math Object
access to mathematical functions and constants
Flash 5; can be used when exporting Flash 4 movies
Math.propertyName
Math.methodName()
Properties
E The constant e, the base of natural logarithms, approximately 2.71828.
LN10 The natural logarithm of 10 (log
e10), approximately 2.30259.
LN2 The natural logarithm of 2 (log
e2), approximately 0.69315.
LOG10E The base-10 logarithm of e, approximately 0.43429.
LOG2E The base-2 logarithm of e, approximately 1.44270.
PI The ratio of a circle’s circumference to its diameter, approximately 3.14159.
SQRT1_2 The reciprocal of the square root of 2, approximately 0.70711.
SQRT2 The square root of 2, approximately 1.41421.
Methods
abs() Compute the absolute value of a number.
acos() Compute the arc cosine of a number.
asin() Compute the arc sine of a number.
atan() Compute the arc tangent of a number.
atan2() Compute the angle of a point, relative to the x-axis.
ceil() Round a number up to the next integer.
cos() Compute the cosine of an angle.
exp() Raise e to a specified power.
floor() Return the closest integer less than or equal to the input.
log() Compute the natural logarithm of a number.
max() Determine the larger of two numbers.
min() Determine the smaller of two numbers.
pow() Raise a number to a ...