package starling.utils {
import openfl.geom.Vector3D;
import openfl.geom.Point;
/**
* A utility class containing methods you might need for math problems.
* @externs
*/
public class MathUtil {
/**
* Calculates the intersection point between the xy-plane and an infinite line
* * that is defined by two 3D points in the same coordinate system.
*/
public static function intersectLineWithXYPlane(pointA:openfl.geom.Vector3D, pointB:openfl.geom.Vector3D, out:openfl.geom.Point = undefined):openfl.geom.Point { return null; }
/**
* Calculates if the point p is inside the triangle a-b-c.
*/
public static function isPointInTriangle(p:openfl.geom.Point, a:openfl.geom.Point, b:openfl.geom.Point, c:openfl.geom.Point):Boolean { return false; }
/**
* Moves a radian angle into the range [-PI, +PI], while keeping the direction intact.
*/
public static function normalizeAngle(angle:Number):Number { return 0; }
/**
* Returns the next power of two that is equal to or bigger than the specified number.
*/
public static function getNextPowerOfTwo(number:Number):int { return 0; }
/**
* Indicates if two float (Number) values are equal, give or take epsilon.
*/
public static function isEquivalent(a:Number, b:Number, epsilon:Number = undefined):Boolean { return false; }
/**
* Returns the larger of the two values. Different to the native Math.max,
* * this doesn't create any temporary objects when using the AOT compiler.
*/
public static function max(a:Number, b:Number):Number { return 0; }
/**
* Returns the smaller of the two values. Different to the native Math.min,
* * this doesn't create any temporary objects when using the AOT compiler.
*/
public static function min(a:Number, b:Number):Number { return 0; }
/**
* Moves value into the range between min and max.
*/
public static function clamp(value:Number, min:Number, max:Number):Number { return 0; }
/**
* Returns the smallest value in an array.
*/
public static function minValues(values:Array):Number { return 0; }
/**
* Converts an angle from degrees into radians.
*/
public static function deg2rad(deg:Number):Number { return 0; }
/**
* Converts an angle from radians into degrees.
*/
public static function rad2deg(rad:Number):Number { return 0; }
public static function toFixed(value:Number, precision:int):String { return null; }
}
}