Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
com.adobe.fiber.runtime.lib 
MathFunc 
Packagecom.adobe.fiber.runtime.lib
Classpublic class MathFunc
InheritanceMathFunc Inheritance Object

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The MathFunc class defines the implementations of the expression runtime functions for Math functions in the Adobe application modeling language.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
[static] The absolute value of a number.
MathFunc
  
[static] Determines the closest integer that is greater than or equal to a specified number.
MathFunc
  
[static] Converts a real number to an integer.
MathFunc
  
[static] Calculates the closest integer that is less than or equal to a number.
MathFunc
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
[static] Returns the larger of two numbers.
MathFunc
  
[static] Returns the smaller of two numbers.
MathFunc
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
[static] Rounds a number to the closest integer.
MathFunc
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
[static] Returns the sign of a number
MathFunc
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Method Detail

abs

()method
public static function abs(n:Number):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The absolute value of a number.

Parameters

n:Number — Number

Returns
Number — Absolute value

ceiling

()method 
public static function ceiling(n:Number):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Determines the closest integer that is greater than or equal to a specified number.

Parameters

n:Number — Number

Returns
Number — Ceiling of the number.

fix

()method 
public static function fix(n:Number):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Converts a real number to an integer. If number is greater than or equal to 0, the closest integer less than or equal to number. If number is less than 0, the closest integer greater than or equal to number.

Parameters

n:Number — Number

Returns
Number — Input converted to an integer

floor

()method 
public static function floor(n:Number):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Calculates the closest integer that is less than or equal to a number.

Parameters

n:Number — Number

Returns
Number — Floor of the number

max

()method 
public static function max(n1:Number, n2:Number):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the larger of two numbers.

Parameters

n1:Number — Number
 
n2:Number — Number

Returns
Number — Larger of the two input numbers

min

()method 
public static function min(n1:Number, n2:Number):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the smaller of two numbers.

Parameters

n1:Number — Number
 
n2:Number — Number

Returns
Number — Smaller of the two input numbers

round

()method 
public static function round(n:Number):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Rounds a number to the closest integer. Rounds numbers that end with .5 up to the nearest integer.

Parameters

n:Number — Number

Returns
Number — Number rounded

sgn

()method 
public static function sgn(n:Number):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the sign of a number

Parameters

n:Number — Number

Returns
int — -1 if num < 0, 0 if num = 0 and 1 if num > 0