| Constant | Defined By | ||
|---|---|---|---|
| acosD : Function
Returns the inverse cosine of a slope ratio and returns its angle in degrees. | core.maths | ||
| acosHm : Function
Anti-hyperbolic cosine. | core.maths | ||
| acosHp : Function
Anti-hyperbolic cosine. | core.maths | ||
| angleOfLine : Function
Returns the angle in degrees between 2 points with this coordinates passed in argument. | core.maths | ||
| asinD : Function
Calculates the arcsine of the passed angle. | core.maths | ||
| asinH : Function
Anti-hyperbolic sine. | core.maths | ||
| atan2D : Function
Calculates the arctangent2 of the passed angle. | core.maths | ||
| atanD : Function
Calculates the arctangent of the passed angle. | core.maths | ||
| atanH : Function
Anti-hyperbolic tangent. | core.maths | ||
| berp : Function
Short for 'boing-like interpolation', this method will first overshoot, then waver back and forth around the end value before coming to a rest. | core.maths | ||
| bounce : Function
Returns a value between 0 and 1 that can be used to easily make bouncing GUI items (a la OS X's Dock)
Example :
import core.maths.bounce ;
trace( bounce( 0.5 ) ) ;
| core.maths | ||
| cartesianToPolar : Function
Converts a vector in cartesian in a polar vector. | core.maths | ||
| ceil : Function
Rounds and returns the ceiling of the specified number or expression. | core.maths | ||
| clamp : Function
Bounds a numeric value between 2 numbers. | core.maths | ||
| clerp : Function
Circular Lerp is like lerp but handles the wraparound from 0 to 360. | core.maths | ||
| cosD : Function
Calculates the cosine of the passed angle. | core.maths | ||
| coserp : Function
Short for 'cosinusoidal interpolation', this method will interpolate while easing around the end, when value is near one. | core.maths | ||
| cosH : Function
Hyperbolic cosine. | core.maths | ||
| DEG2RAD : Number = 0.017453292519943295
This constant change degrees to radians : Math.PI/180. | core.maths | ||
| degreesToRadians : Function
Converts an angle in degrees in radians
| core.maths | ||
| distance : Function
Returns the distance between 2 points with the coordinates of the 2 points. | core.maths | ||
| distanceByObject : Function
Returns the distance between 2 points with the coordinates of the 2 points. | core.maths | ||
| EPSILON : Number = 0.000000001
Represents the smallest positive Single value greater than zero. | core.maths | ||
| fixAngle : Function
Fixs an angle in degrees between 0 and 360 degrees. | core.maths | ||
| floor : Function
Rounds and returns a number by a count of floating points. | core.maths | ||
| gcd : Function
Returns the greatest common divisor with the Euclidean algorithm. | core.maths | ||
| hermite : Function
This method will interpolate while easing in and out at the limits. | core.maths | ||
| hypothenuse : Function
Calculates the hypothenuse value of the two passed-in triangle sides value. | core.maths | ||
| interpolate : Function
With a number value and a range this method returns the actual value for the interpolated value in that range. | core.maths | ||
| isEven : Function
Indicates if an integer that is "evenly divisible" by 2. | core.maths | ||
| isOdd : Function
Indicates if an integer that is not "evenly divisible" by 2. | core.maths | ||
| LAMBDA : Number = 0.57721566490143
This constant is the Euler-Mascheroni constant (lambda or C) :
( n )
lim( sigma 1/k - ln(n) )
n->oo ( k=1 )
| core.maths | ||
| lerp : Function
Calculates a number between two numbers at a specific increment. | core.maths | ||
| log10 : Function
Calculates the log10 of the specified value. | core.maths | ||
| logN : Function
Calculates the logN of the specified value. | core.maths | ||
| map : Function
Takes a value in a given range (minimum1, maximum1) and finds the corresponding value in the next range(minimum2, maximum2). | core.maths | ||
| normalize : Function
Takes a value within a given range and converts it to a number between 0 and 1. | core.maths | ||
| percentage : Function
Returns a percentage or null. | core.maths | ||
| PHI : Number = 1.61803398874989
This constant is the golden ratio (phi) : ( 1 + Math.sqrt(5) ) / 2. | core.maths | ||
| polarToCartesian : Function
Converts a Polar object in a cartesian vector. | core.maths | ||
| RAD2DEG : Number = 57.29577951308232
This constant change radians to degrees : 180/Math.PI. | core.maths | ||
| radiansToDegrees : Function
Converts an angle in radians in degrees
| core.maths | ||
| replaceNaN : Function
Replace the passed-in Number value, if the value is NaN the return value is the default value in second argument. | core.maths | ||
| round : Function
Rounds and returns a number by a count of floating points. | core.maths | ||
| sign : Function
Returns 1 if the value is positive or -1. | core.maths | ||
| sinD : Function
Calculates the sine of the passed angle. | core.maths | ||
| sinerp : Function
Short for 'sinusoidal interpolation', this method will interpolate while easing around the end, when value is near one. | core.maths | ||
| sinH : Function
Hyperbolic sine. | core.maths | ||
| tanD : Function
Calculates the tangent of the passed angle. | core.maths | ||
| tanH : Function
Hyperbolic tangent. | core.maths | ||
| DEG2RAD | Constant |
public const DEG2RAD:Number = 0.017453292519943295This constant change degrees to radians : Math.PI/180.
| EPSILON | Constant |
public const EPSILON:Number = 0.000000001Represents the smallest positive Single value greater than zero.
| LAMBDA | Constant |
public const LAMBDA:Number = 0.57721566490143This constant is the Euler-Mascheroni constant (lambda or C) :
( n )
lim( sigma 1/k - ln(n) )
n->oo ( k=1 )
| PHI | Constant |
public const PHI:Number = 1.61803398874989This constant is the golden ratio (phi) : ( 1 + Math.sqrt(5) ) / 2.
| RAD2DEG | Constant |
public const RAD2DEG:Number = 57.29577951308232This constant change radians to degrees : 180/Math.PI.
| acosD | Constant |
public const acosD:FunctionReturns the inverse cosine of a slope ratio and returns its angle in degrees.
| acosHm | Constant |
public const acosHm:FunctionAnti-hyperbolic cosine.
acoshm = ln(x-√(x^2-1))
| acosHp | Constant |
public const acosHp:FunctionAnti-hyperbolic cosine.
acoshp = ln(x+√(x^2-1))
| angleOfLine | Constant |
public const angleOfLine:FunctionReturns the angle in degrees between 2 points with this coordinates passed in argument.
| asinD | Constant |
public const asinD:FunctionCalculates the arcsine of the passed angle.
| asinH | Constant |
public const asinH:FunctionAnti-hyperbolic sine.
| atan2D | Constant |
public const atan2D:FunctionCalculates the arctangent2 of the passed angle.
| atanD | Constant |
public const atanD:FunctionCalculates the arctangent of the passed angle.
| atanH | Constant |
public const atanH:FunctionAnti-hyperbolic tangent.
| berp | Constant |
public const berp:FunctionShort for 'boing-like interpolation', this method will first overshoot, then waver back and forth around the end value before coming to a rest.
Example :
import core.maths.berp ;
trace( berp( 0 , 100 , 0.5 ) ;
| bounce | Constant |
public const bounce:FunctionReturns a value between 0 and 1 that can be used to easily make bouncing GUI items (a la OS X's Dock)
Example :
import core.maths.bounce ;
trace( bounce( 0.5 ) ) ;
| cartesianToPolar | Constant |
public const cartesianToPolar:FunctionConverts a vector in cartesian in a polar vector. Return a generic object with the properties angle and radius.
| ceil | Constant |
public const ceil:FunctionRounds and returns the ceiling of the specified number or expression. The ceiling of a number is the closest integer that is greater than or equal to the number.
Example :
import core.maths.ceil ;
var n:Number ;
n = ceil(4.572525153, 2) ;
trace ("n : " + n) ; // n : 4.58
n = ceil(4.572525153, -1) ;
trace ("n : " + n) ; // n : 5
| clamp | Constant |
public const clamp:FunctionBounds a numeric value between 2 numbers.
Example :
import core.maths.clamp ;
var n:Number ;
n = clamp(4, 5, 10) ;
trace ("n : " + n) ; // 5
n = clamp(12, 5, 10) ;
trace ("n : " + n) ; // 10
n = clamp(6, 5, 10) ;
trace ("n : " + n) ; // 5
var n = clamp(NaN, 5, 10) ;
trace ("n : " + n) ; // NaN
| clerp | Constant |
public const clerp:FunctionCircular Lerp is like lerp but handles the wraparound from 0 to 360. This is useful when interpolating eulerAngles and the object crosses the 0/360 boundary. The standard Lerp function causes the object to rotate in the wrong direction and looks stupid, clerp() fixes that.
Example :
import core.maths.clerp ;
trace( clerp( 0 , 180 , 0.5 ) ; // 90
| cosD | Constant |
public const cosD:FunctionCalculates the cosine of the passed angle.
| cosH | Constant |
public const cosH:FunctionHyperbolic cosine.
| coserp | Constant |
public const coserp:FunctionShort for 'cosinusoidal interpolation', this method will interpolate while easing around the end, when value is near one.
Example :
import core.maths.coserp ;
trace( coserp( 0 , 100 , 0.5 ) ;
| degreesToRadians | Constant |
public const degreesToRadians:FunctionConverts an angle in degrees in radians
| distanceByObject | Constant |
public const distanceByObject:FunctionReturns the distance between 2 points with the coordinates of the 2 points.
| distance | Constant |
public const distance:FunctionReturns the distance between 2 points with the coordinates of the 2 points.
| fixAngle | Constant |
public const fixAngle:FunctionFixs an angle in degrees between 0 and 360 degrees.
| floor | Constant |
public const floor:FunctionRounds and returns a number by a count of floating points.
Example :
import core.maths.floor ;
var n:Number ;
n = floor(4.572525153, 2) ;
trace ("n : " + n) ; // n : 4.57
n = floor(4.572525153, -1) ;
trace ("n : " + n) ; // n : 4
| gcd | Constant |
public const gcd:FunctionReturns the greatest common divisor with the Euclidean algorithm.
Example :
import core.maths.gcd ;
trace("gcd(320,240) : " + gcd(320,240) ) ; // gcd(320,240) : 80
| hermite | Constant |
public const hermite:FunctionThis method will interpolate while easing in and out at the limits.
Example :
import core.maths.hermite ;
trace( hermite( 0 , 100 , 0.5 ) ; // 50
| hypothenuse | Constant |
public const hypothenuse:FunctionCalculates the hypothenuse value of the two passed-in triangle sides value.
A hypotenuse is the longest side of a right triangle (Right-angled triangle in British English), the side opposite the right angle. The length of the hypotenuse of a right triangle can be found using the Pythagorean theorem, which states that the square of the length of the hypotenuse equals the sum of the squares of the lengths of the other two sides.
| interpolate | Constant |
public const interpolate:FunctionWith a number value and a range this method returns the actual value for the interpolated value in that range.
import core.maths.interpolate ;
trace( interpolate( 0.5, 0 , 100 ) ) ; // 50
| isEven | Constant |
public const isEven:FunctionIndicates if an integer that is "evenly divisible" by 2.
| isOdd | Constant |
public const isOdd:FunctionIndicates if an integer that is not "evenly divisible" by 2.
| lerp | Constant |
public const lerp:FunctionCalculates a number between two numbers at a specific increment. The lerp function is convenient for creating motion along a straight path and for drawing dotted lines.
Lerp is an abbreviation for linear interpolation, which can also be used as a verb (Raymond 2003).
Linear interpolation is a method of curve fitting using linear polynomials. It is heavily employed in mathematics (particularly numerical analysis), and numerous applications including computer graphics. It is a simple form of interpolation.
Example :
import core.maths.lerp ;
trace( lerp( 0 , 100 , 0.5 ) ; // 50
| log10 | Constant |
public const log10:FunctionCalculates the log10 of the specified value.
| logN | Constant |
public const logN:FunctionCalculates the logN of the specified value.
| map | Constant |
public const map:FunctionTakes a value in a given range (minimum1, maximum1) and finds the corresponding value in the next range(minimum2, maximum2).
import core.maths.map ;
trace( map( 10, 0, 100, 20, 80 ) ) ; // 26
trace( map( 26, 20, 80, 0, 100 ) ) ; // 10
| normalize | Constant |
public const normalize:FunctionTakes a value within a given range and converts it to a number between 0 and 1. Actually it can be outside that range if the original value is outside its range.
import core.maths.normalize ;
trace( normalize( 10, 0 , 100 ) ) ; // 0.1
| percentage | Constant |
public const percentage:FunctionReturns a percentage or null.
Example :
import core.maths.percentage ;
trace( percentage( 50 , 100 ) + "%" ) ; // 50%
trace( percentage( 68 , 425 ) + "%" ) ; // 16%
| polarToCartesian | Constant |
public const polarToCartesian:FunctionConverts a Polar object in a cartesian vector.
| radiansToDegrees | Constant |
public const radiansToDegrees:FunctionConverts an angle in radians in degrees
| replaceNaN | Constant |
public const replaceNaN:FunctionReplace the passed-in Number value, if the value is NaN the return value is the default value in second argument.
| round | Constant |
public const round:FunctionRounds and returns a number by a count of floating points.
Example :
import core.maths.round ;
var n:Number ;
n = round(4.572525153, 2) ;
trace ("n : " + n) ; // 4.57
var n = round(4.572525153, -1) ;
trace ("n : " + n) ; // 5
| sign | Constant |
public const sign:FunctionReturns 1 if the value is positive or -1.
Example :
import core.maths.sign ;
var n:int ;
n = sign(-150) ;
trace ("n : " + n) ; // -1
n = sign(200) ;
trace ("n : " + n) ; // 1
n = sign(0) ;
trace ("n : " + n) ; // 1
RangeError — if the passed-in value is NaN.
|
| sinD | Constant |
public const sinD:FunctionCalculates the sine of the passed angle.
| sinH | Constant |
public const sinH:FunctionHyperbolic sine.
| sinerp | Constant |
public const sinerp:FunctionShort for 'sinusoidal interpolation', this method will interpolate while easing around the end, when value is near one.
Example :
import core.maths.sinerp ;
trace( sinerp( 0 , 100 , 0.5 ) ;
| tanD | Constant |
public const tanD:FunctionCalculates the tangent of the passed angle.
| tanH | Constant |
public const tanH:FunctionHyperbolic tangent.