Max (Math.max Method); Min (Math.min 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

max (Math.max method)

public static max(x:Number, y:Number) : Number
Evaluates
and
and returns the larger value.
x
y
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 or expression.
x:Number
- A number or expression.
y:Number
Returns
- A number.
Number
Example
The following example displays
of the evaluated expressions.
var date1:Date = new Date(2004, 11, 25);
var date2:Date = new Date(2004, 11, 30);
var maxDate:Number = Math.max(date1.getTime(), date2.getTime());
trace(new Date(maxDate).toString());
See also

min (Math.min method)

min (Math.min method)
public static min(x:Number, y:Number) : Number
Evaluates
and
and returns the smaller value.
x
y
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 or expression.
x:Number
- A number or expression.
y:Number
422
ActionScript classes
Thu Dec 30 00:00:00 GMT-0700 2004
, which is the larger

Advertisement

Table of Contents
loading

Table of Contents