Minor code formatting

This commit is contained in:
Yaski
2012-07-19 01:18:08 +06:00
parent 749df640a5
commit 3bc0080fa7
2 changed files with 19 additions and 16 deletions

View File

@@ -411,7 +411,6 @@ public class Camera3D extends Object3D {
/** /**
* Setup Camera3D position using x, y, z coordinates * Setup Camera3D position using x, y, z coordinates
*/ */
public function setPosition(x:Number, y:Number, z:Number):void{ public function setPosition(x:Number, y:Number, z:Number):void{
this.x = x; this.x = x;
this.y = y; this.y = y;

View File

@@ -23,20 +23,24 @@ package alternativa.engine3d.utils {
private static const toRootTransform:Transform3D = new Transform3D(); private static const toRootTransform:Transform3D = new Transform3D();
private static const fromRootTransform:Transform3D = new Transform3D(); private static const fromRootTransform:Transform3D = new Transform3D();
private static const RAD2DEG:Number = 180/Math.PI;
private static const DEG2RAD:Number = Math.PI/180;
/** /**
* @public
* Convert Degress to Radians and Radians to Degrees * Convert Degress to Radians and Radians to Degrees
*/ */
public static function toRadians(degrees:Number):Number{ public static function toRadians(degrees:Number):Number{
return degrees * Math.PI / 180; return degrees * DEG2RAD;
} }
/**
* Convert Radians to Degrees
*/
public static function toDegrees(radians:Number):Number{ public static function toDegrees(radians:Number):Number{
return radians * 180 / Math.PI; return radians * RAD2DEG;
} }
/** /**
* @private * @private
* Performs calculation of bound box of objects hierarchy branch. * Performs calculation of bound box of objects hierarchy branch.