瀏覽代碼

Math.PI instead of 3.14

Bc. Jan Kaláb 14 年之前
父節點
當前提交
a734cc34e7
共有 1 個文件被更改,包括 3 次插入3 次删除
  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 );
 
 		}