public function Util()
public static function degToDMS(dec:Number, locals:Array = null, numDigits:Number = 1):String
Convert decimal degrees number into sexagecimal degrees string.
Parameters
| dec:Number — decimal degrees.
|
| |
| locals:Array (default = null) — the axis direction (N, S) or (E, W). If undefined, null or empty, the leading
minus will prefix the decimal degrees string.
|
| |
| numDigits:Number (default = 1) — number of figures in tenth of second.
|
Returns
| String — the sexagecimal value whose syntax conforms with dmsToDeg() function.
|
public static function dmsToDeg(dms:String):Number
Convert a string representation of a sexagecimal degrees into a numeric representation of
decimal degrees.
Parameters
| dms:String — a sexagecimal value. The supported syntax is :
\s?-?(\d{1,3})[.,°d]?\s?(\d{0,2})[']?\s?(\d{0,2})[.,]?(\d{0,})(?:["]|[']{2})?
|
\s?(\d{1,3})[.,°d]?\s?(\d{0,2})[']?\s?(\d{0,2})[.,]?(\d{0,})(?:["]|[']{2})?\s?([NSEW])?
|
Returns
| Number — the decimal value or NaN if error occurs.
|
public static function extend(destination:Object, source:Object):Object
Copy all properties of a source object to a destination object.
Modifies the passed in destination object.
Parameters
| destination:Object — The object that will be modified
|
| |
| source:Object — The object with properties to be set on the destination
|
Returns
| Object — The destination object
|
public static function getArgs(url:String = null):Object
Get Ags
Parameters
| url:String (default = null) |
Returns
| Object — An object of key/value pairs from the query string
|
public static function getParameterString(params:Object):String
Get parameter
Parameters
Returns
| String — A concatenation of the properties of an object in http parameter notation
|
public function hypot(x:Number, y:Number):Number
Return sqrt(x2 +y2) without intermediate overflow or underflow.
Special cases:
- If either argument is infinite, then the result is positive infinity.
- If either argument is NaN and neither argument is infinite, then the result is NaN.
The computed result must be within 1 ulp of the exact result. If one parameter is held
constant, the results must be semi-monotonic in the other parameter.
Parameters
| x:Number — a value.
|
| |
| y:Number — a value.
|
Returns
| Number — sqrt(x2 +y2) without intermediate overflow or underflow.
|
public static function indexOf(array:Array, obj:Object):int
Get the index of an object in an array
Parameters
| array:Array — array containning items
|
| |
| obj:Object — Item that we find index
|
Returns
public static function mouseLeft(evt:MouseEvent, can:DisplayObject):BooleanParameters
| evt:MouseEvent |
| |
| can:DisplayObject |
Returns
public static function normalizeScale(scale:Number):Number
Normalise scale
Parameters
Returns
| Number — return a normalized scale value, in 1 / X format
|
public static function pagePosition(forElement:Object):ArrayParameters
Returns
public static function removeItem(array:Array, item:Object):Array
Remove an item of an array
Parameters
| array:Array — the array containing items
|
| |
| item:Object — item to remove
|
Returns
public static function upperCaseObject(object:Object):Object
Store all the keys of the Object in uppercase
Parameters
Returns
| Object — a new Object with all the same keys but uppercased
|