EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Abs (Math.abs Method)

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Math 413
Methods inherited from class Object
abs (Math.abs method)
public static abs(x:Number) : Number
Computes and returns an absolute value for the number specified by the parameter x.
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
x:Number - A number.
Returns
Number - A number.
Example
The following example shows how
Math.abs() returns the absolute value of a number and
does not affect the value of the
x parameter (called num in this example):
var num:Number = -12;
var numAbsolute:Number = Math.abs(num);
trace(num); // output: -12
trace(numAbsolute); // output: 12
static sin(x:Number) : Number Computes and returns the sine of the
specified angle in radians.
static sqrt(x:Number) : Number Computes and returns the square root of the
specified number.
static tan(x:Number) : Number Computes and returns the tangent of the
specified angle.
addProperty (Object.addProperty method), hasOwnProperty
(Object.hasOwnProperty method), isPropertyEnumerable
(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf
method), registerClass (Object.registerClass method), toString
(Object.toString method), unwatch (Object.unwatch method), valueOf
(Object.valueOf method), watch (Object.watch method)
Modifiers Signature Description

Table of Contents

Related product manuals