The Degree class includes wrappers for the built-in Math functions (sin, cos, tan, and their inverses) that allow you to work with angles in degrees instead of radians.
ActionScript 2.0; Flash Player 6
Method summary
| Method | Description |
|---|---|
| sinD(angle:Number) : Number |
Takes an angle in degrees and returns its sine. |
| cosD(angle:Number) : Number |
Takes an angle in degrees and returns its cosine. |
| tanD(angle:Number) : Number |
Takes an angle in degrees and returns its tangent. |
| asinD(ratio:Number) : Number |
Takes the inverse sine of a slope ratio and returns its angle in degrees. |
| acosD(ratio:Number) : Number |
Takes the inverse cosine of a slope ratio and returns its angle in degrees. |
| atanD(ratio:Number) : Number |
Takes the inverse tangent of a slope ratio and returns its angle in degrees. |
| atan2D(y:Number, x:Number) : Number |
Takes the inverse tangent of a slope ratio and returns its angle in degrees. |
trace (Degree.sinD(90));
angle:Number
- The angle in degrees.
Returns the sine of the angle.
Takes an angle in degrees and returns its sine.
trace (Degree.cosD(0));
angle:Number
- The angle in degrees.
Returns the cosine of the angle.
Takes an angle in degrees and returns its cosine.
trace (Degree.tanD(45));
angle:Number
- The angle in degrees.
Returns the tangent of the angle.
Takes an angle in degrees and returns its tangent.
trace (Degree.asinD(1));
ratio:Number
- The slope ratio.
Returns the angle in degrees.
Takes the inverse sine of a slope ratio and returns its angle in degrees.
trace (Degree.acosD(1));
ratio:Number
- The slope ratio.
Returns the angle in degrees.
Takes the inverse cosine of a slope ratio and returns its angle in degrees.
trace (Degree.atanD(1));
ratio:Number
- The slope ratio.
Returns the angle in degrees.
Takes the inverse tangent of a slope ratio and returns its angle in degrees.
trace (Degree.atan2D(7, 7));
y:Number
- The y coordinate of the slope ratio.
x:Number
- The x coordinate of the slope ratio.
Returns the angle in degrees.
Takes the inverse tangent of a slope ratio and returns its angle in degrees.