Public Methods
 FunctionDefined By
  
cleanMasterString(str:String):String
Replaces a string's "master string" — the string it was built from — with a single character to save memory.
starling.utils
  
deg2rad(deg:Number):Number
Converts an angle from degrees into radians.
starling.utils
  
execute(func:Function, ... args):void
Executes a function with the specified arguments.
starling.utils
  
formatString(format:String, ... args):String
Formats a String in .Net-style, with curly braces ("{0}").
starling.utils
  
getNextPowerOfTwo(number:Number):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 radians 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
cleanMasterString()function
public function cleanMasterString(str:String):String

Replaces a string's "master string" — the string it was built from — with a single character to save memory. Find more information about this AS3 oddity here.

Parameters

str:String — String to clean

Returns
String — The input string, but with a master string only one character larger than it.
deg2rad()function 
public function deg2rad(deg:Number):Number

Converts an angle from degrees into radians.

Parameters

deg:Number

Returns
Number
execute()function 
public function execute(func:Function, ... args):void

Executes a function with the specified arguments. If the argument count does not match the function, the argument list is cropped / filled up with null values.

Parameters

func:Function
 
... args

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:Number):int

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

Parameters

number:Number

Returns
int
rad2deg()function 
public function rad2deg(rad:Number):Number

Converts an angle from radians 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