Packageutils.common.math
Classpublic class MathHelper
InheritanceMathHelper Inheritance Object

MathHelper.as Class for some helper functions: random numbers, random positions....



Public Methods
 MethodDefined By
  
calculateSpiralPositions(origin:Point, radius:Number, rotations:Number, pointDistance:uint, rotationAt:Number):Vector.<Point>
[static]
MathHelper
  
randomInt(minNum:Number, maxNum:Number):Number
[static]
MathHelper
  
randomPosition(minX:Number, maxX:Number, minY:Number, maxY:Number):Point
[static]
MathHelper
  
randomPositionCircle(minX:Number, maxX:Number, minY:Number, maxY:Number):Point
[static]
MathHelper
  
randomPositionFixedCircle(origin:Point, minX:Number, maxX:Number, minY:Number, maxY:Number):Point
[static]
MathHelper
  
randomRangeFloat(minNum:Number, maxNum:Number):Number
[static]
MathHelper
  
randomRangeInt(minNum:Number, maxNum:Number):Number
[static]
MathHelper
Method Detail
calculateSpiralPositions()method
public static function calculateSpiralPositions(origin:Point, radius:Number, rotations:Number, pointDistance:uint, rotationAt:Number):Vector.<Point>

Parameters

origin:Point
 
radius:Number
 
rotations:Number
 
pointDistance:uint
 
rotationAt:Number

Returns
Vector.<Point>
randomInt()method 
public static function randomInt(minNum:Number, maxNum:Number):Number

Parameters

minNum:Number
 
maxNum:Number

Returns
Number
randomPosition()method 
public static function randomPosition(minX:Number, maxX:Number, minY:Number, maxY:Number):Point

Parameters

minX:Number
 
maxX:Number
 
minY:Number
 
maxY:Number

Returns
Point
randomPositionCircle()method 
public static function randomPositionCircle(minX:Number, maxX:Number, minY:Number, maxY:Number):Point

Parameters

minX:Number
 
maxX:Number
 
minY:Number
 
maxY:Number

Returns
Point
randomPositionFixedCircle()method 
public static function randomPositionFixedCircle(origin:Point, minX:Number, maxX:Number, minY:Number, maxY:Number):Point

Parameters

origin:Point
 
minX:Number
 
maxX:Number
 
minY:Number
 
maxY:Number

Returns
Point
randomRangeFloat()method 
public static function randomRangeFloat(minNum:Number, maxNum:Number):Number

Parameters

minNum:Number
 
maxNum:Number

Returns
Number
randomRangeInt()method 
public static function randomRangeInt(minNum:Number, maxNum:Number):Number

Parameters

minNum:Number
 
maxNum:Number

Returns
Number