|
@@ -36,7 +36,7 @@ THREE.PerspectiveCamera.prototype.setLens = function ( focalLength, frameHeight
|
|
|
|
|
|
if ( frameHeight === undefined ) frameHeight = 24;
|
|
|
|
|
|
- this.fov = 2 * THREE.Math.radToDeg( Math.atan( frameHeight / ( focalLength * 2 ) ) );
|
|
|
+ this.fov = 2 * THREE.Math.RAD2DEG * Math.atan( frameHeight / ( focalLength * 2 ) );
|
|
|
this.updateProjectionMatrix();
|
|
|
|
|
|
};
|
|
@@ -94,12 +94,12 @@ THREE.PerspectiveCamera.prototype.setViewOffset = function ( fullWidth, fullHeig
|
|
|
|
|
|
THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {
|
|
|
|
|
|
- var fov = THREE.Math.radToDeg( 2 * Math.atan( Math.tan( THREE.Math.degToRad( this.fov ) * 0.5 ) / this.zoom ) );
|
|
|
+ var fov = THREE.Math.RAD2DEG * ( 2 * Math.atan( Math.tan( THREE.Math.DEG2RAD * this.fov * 0.5 ) / this.zoom ) );
|
|
|
|
|
|
if ( this.fullWidth ) {
|
|
|
|
|
|
var aspect = this.fullWidth / this.fullHeight;
|
|
|
- var top = Math.tan( THREE.Math.degToRad( fov * 0.5 ) ) * this.near;
|
|
|
+ var top = Math.tan( THREE.Math.DEG2RAD * fov * 0.5 ) * this.near;
|
|
|
var bottom = - top;
|
|
|
var left = aspect * bottom;
|
|
|
var right = aspect * top;
|