Browse Source

Minor changes per @mrdoob comments.

Changed
if (aRotation ) {
to
if ( aRotation !== 0 ) {
neko 10 years ago
parent
commit
7d31bc715d
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/extras/core/Path.js
  2. 1 1
      src/extras/curves/EllipseCurve.js

+ 2 - 2
src/extras/core/Path.js

@@ -395,7 +395,7 @@ THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
 			var tdivisions = divisions * 2;
 
 			var cos, sin;
-			if ( aRotation ) {
+			if ( aRotation !== 0 ) {
 		
 				cos = Math.cos( aRotation );
 				sin = Math.sin( aRotation );
@@ -417,7 +417,7 @@ THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
 				tx = aX + xRadius * Math.cos( angle );
 				ty = aY + yRadius * Math.sin( angle );
 
-				if ( aRotation ) {
+				if ( aRotation !== 0 ) {
 
 					// Rotate the point about the center of the ellipse.
 					tx = ( tx - aX ) * cos - ( ty - aY ) * sin + aX;

+ 1 - 1
src/extras/curves/EllipseCurve.js

@@ -44,7 +44,7 @@ THREE.EllipseCurve.prototype.getPoint = function ( t ) {
 	var x = this.aX + this.xRadius * Math.cos( angle );
 	var y = this.aY + this.yRadius * Math.sin( angle );
 
-	if ( this.aRotation ) {
+	if ( this.aRotation !== 0 ) {
 
 		var cos = Math.cos( this.aRotation );
 		var sin = Math.sin( this.aRotation );