File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -458,19 +458,19 @@ p5.Vector = class {
458458 }
459459 }
460460 } else if ( args . length === 1 ) {
461- if ( Number . isFinite ( args [ 0 ] ) && args [ 0 ] !== 0 ) {
462- this . x = this . x % args [ 0 ] ;
463- this . y = this . y % args [ 0 ] ;
464- this . z = this . z % args [ 0 ] ;
461+ if ( Number . isFinite ( x ) && x !== 0 ) {
462+ this . x = this . x % x ;
463+ this . y = this . y % x ;
464+ this . z = this . z % x ;
465465 return this ;
466466 }
467467 } else if ( args . length === 2 ) {
468468 const vectorComponents = args ;
469469 if ( vectorComponents . every ( element => Number . isFinite ( element ) ) ) {
470470 if ( vectorComponents . length === 2 ) {
471471 return this . calculateRemainder2D (
472- vectorComponents [ 0 ] ,
473- vectorComponents [ 1 ]
472+ x ,
473+ y
474474 ) ;
475475 }
476476 }
@@ -479,9 +479,9 @@ p5.Vector = class {
479479 if ( vectorComponents . every ( element => Number . isFinite ( element ) ) ) {
480480 if ( vectorComponents . length === 3 ) {
481481 return this . calculateRemainder3D (
482- vectorComponents [ 0 ] ,
483- vectorComponents [ 1 ] ,
484- vectorComponents [ 2 ]
482+ x ,
483+ y ,
484+ z
485485 ) ;
486486 }
487487 }
You can’t perform that action at this time.
0 commit comments