mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 09:59:10 -07:00
Converting between Radians and Degrees
This commit is contained in:
@@ -23,6 +23,20 @@ package alternativa.engine3d.utils {
|
||||
private static const toRootTransform:Transform3D = new Transform3D();
|
||||
private static const fromRootTransform:Transform3D = new Transform3D();
|
||||
|
||||
/**
|
||||
* @public
|
||||
* Convert Degress to Radians and Radians to Degrees
|
||||
*/
|
||||
|
||||
public static function toRadians(degrees:Number):Number{
|
||||
return degrees * Math.PI / 180;
|
||||
}
|
||||
|
||||
public static function toDegrees(radians:Number):Number{
|
||||
return radians * 180 / Math.PI;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Performs calculation of bound box of objects hierarchy branch.
|
||||
|
||||
Reference in New Issue
Block a user