提交 03b71c97 编写于 作者: M Mr.doob

Curve/CurvePath: Replace isNaN with undefined check. See #10641.

上级 37fd62b0
......@@ -65,7 +65,7 @@ Object.assign( Curve.prototype, {
getPoints: function ( divisions ) {
if ( isNaN( divisions ) ) divisions = 5;
if ( divisions === undefined ) divisions = 5;
var points = [];
......@@ -83,7 +83,7 @@ Object.assign( Curve.prototype, {
getSpacedPoints: function ( divisions ) {
if ( isNaN( divisions ) ) divisions = 5;
if ( divisions === undefined ) divisions = 5;
var points = [];
......@@ -110,7 +110,7 @@ Object.assign( Curve.prototype, {
getLengths: function ( divisions ) {
if ( isNaN( divisions ) ) divisions = ( this.__arcLengthDivisions ) ? ( this.__arcLengthDivisions ) : 200;
if ( divisions === undefined ) divisions = ( this.__arcLengthDivisions ) ? ( this.__arcLengthDivisions ) : 200;
if ( this.cacheArcLengths
&& ( this.cacheArcLengths.length === divisions + 1 )
......
......@@ -139,7 +139,7 @@ CurvePath.prototype = Object.assign( Object.create( Curve.prototype ), {
getSpacedPoints: function ( divisions ) {
if ( isNaN( divisions ) ) divisions = 40;
if ( divisions === undefined ) divisions = 40;
var points = [];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册