GODPAPER | All Packages | All Classes | Index | Frames No Frames |
Package

Public Methods

| Function | Defined By
--- | --- | ---
|  | deg2rad(deg:Number):Number Converts an angle from degrees into radians. | starling.utils
|  | formatString(format:String, ... args):String Formats a String in .Net-style, with curly braces ("{0}"). | starling.utils
|  | getNextPowerOfTwo(number:int):int Returns the next power of two that is equal to or bigger than the specified number. | starling.utils
|  | rad2deg(rad:Number):Number Converts an angle from radions into degrees. | starling.utils
|  | transformCoords(matrix:Matrix, x:Number, y:Number, resultPoint:Point = null):Point Uses a matrix to transform 2D coordinates into a different space. | starling.utils

Function detail

deg2rad | () | function

`public function deg2rad(deg:Number):Number`

Converts an angle from degrees into radians.

Parameters

| `deg:Number`

Returns

| `Number`

formatString | () | function |

`public function formatString(format:String, ... args):String`

Formats a String in .Net-style, with curly braces ("{0}"). Does not support any number formatting options yet.

Parameters

| `format:String`
| `... args`

Returns

| `String`

getNextPowerOfTwo | () | function |

`public function getNextPowerOfTwo(number:int):int`

Returns the next power of two that is equal to or bigger than the specified number.

Parameters

| `number:int`

Returns

| `int`

rad2deg | () | function |

`public function rad2deg(rad:Number):Number`

Converts an angle from radions into degrees.

Parameters

| `rad:Number`

Returns

| `Number`

transformCoords | () | function |

`public function transformCoords(matrix:Matrix, x:Number, y:Number, resultPoint:Point = null):Point`

Uses a matrix to transform 2D coordinates into a different space. If you pass a 'resultPoint', the result will be stored in this point instead of creating a new object.

Parameters

| `matrix:Matrix`
| `x:Number`
| `y:Number`
| `resultPoint:Point` (default = `null`)``

Returns

| `Point`

Thu Jan 16 2014, 01:13 PM +08:00