Ver código fonte

Math.PI instead of 3.14

Bc. Jan Kaláb 14 anos atrás
pai
commit
a734cc34e7
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      src/extras/cameras/FirstPersonCamera.js

+ 3 - 3
src/extras/cameras/FirstPersonCamera.js

@@ -49,7 +49,7 @@ THREE.FirstPersonCamera = function ( parameters ) {
 
 	this.constrainVertical = false;
 	this.verticalMin = 0;
-	this.verticalMax = 3.14;
+	this.verticalMax = Math.PI;
 
 	this.domElement = document;
 
@@ -272,7 +272,7 @@ THREE.FirstPersonCamera = function ( parameters ) {
 
 		if ( this.constrainVertical ) {
 
-			verticalLookRatio = 3.14 / ( this.verticalMax - this.verticalMin );
+			verticalLookRatio = Math.PI / ( this.verticalMax - this.verticalMin );
 
 		}
 
@@ -286,7 +286,7 @@ THREE.FirstPersonCamera = function ( parameters ) {
 
 		if ( this.constrainVertical ) {
 
-			this.phi = map_linear( this.phi, 0, 3.14, this.verticalMin, this.verticalMax );
+			this.phi = map_linear( this.phi, 0, Math.PI, this.verticalMin, this.verticalMax );
 
 		}