Sin (Math.sin Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example returns a random number between two specified integers.
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.round(Math.random() * (max-min+1) + (min-
.5));
return randomNum;
}
for (var i = 0; i<25; i++) {
trace(randRange(4, 11));
}
See also
ceil (Math.ceil method)

sin (Math.sin method)

public static sin(x:Number) : Number
Computes and returns the sine of the specified angle in radians. To calculate a radian, see the
description of the Math class entry.
Availability: ActionScript 1.0; Flash Lite 2.0 - In Flash Player 4, the methods and properties
of the Math class are emulated using approximations and might not be as accurate as the non-
emulated math functions that Flash Player 5 supports.
Parameters
- A number that represents an angle measured in radians.
x:Number
Returns
- A number; the sine of the specified angle (between -1.0 and 1.0).
Number
426
ActionScript classes
,
floor (Math.floor method)

Advertisement

Table of Contents
loading

Table of Contents