Method | Defined By | ||
---|---|---|---|
Util() | Util | ||
addLeadingZero(n:Number):String [static]
Formats a number to include a leading zero if it is a single digit
between -1 and 10. | Util | ||
HexToRGB(hex:uint):Array [static] | Util | ||
RGBToHex(r:uint, g:uint, b:uint):uint [static] | Util | ||
toBoolean(s:String):Boolean [static] | Util | ||
toDegrees(radians:Number):Number [static] | Util | ||
toHex(n:int, bigEndian:Boolean = false):String [static]
Outputs the hex value of a int, allowing the developer to specify
the endinaness in the process. | Util | ||
toRadians(degrees:Number):Number [static] | Util |
Util | () | Constructor |
public function Util()
addLeadingZero | () | method |
public static function addLeadingZero(n:Number):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Formats a number to include a leading zero if it is a single digit between -1 and 10.
Parameters
n:Number — The number that will be formatted
|
String — A string with single digits between -1 and 10 padded with a
leading zero.
|
HexToRGB | () | method |
public static function HexToRGB(hex:uint):Array
Parameters
hex:uint |
Array |
RGBToHex | () | method |
public static function RGBToHex(r:uint, g:uint, b:uint):uint
Parameters
r:uint | |
g:uint | |
b:uint |
uint |
toBoolean | () | method |
public static function toBoolean(s:String):Boolean
Parameters
s:String |
Boolean |
toDegrees | () | method |
public static function toDegrees(radians:Number):Number
Parameters
radians:Number |
Number |
toHex | () | method |
public static function toHex(n:int, bigEndian:Boolean = false):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Outputs the hex value of a int, allowing the developer to specify the endinaness in the process. Hex output is lowercase.
Parameters
n:int — The int value to output as hex
| |
bigEndian:Boolean (default = false ) — Flag to output the int as big or little endian
|
String — A string of length 8 corresponding to the
hex representation of n ( minus the leading "0x" )
|
toRadians | () | method |
public static function toRadians(degrees:Number):Number
Parameters
degrees:Number |
Number |