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 {
458
458
}
459
459
}
460
460
} 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 ;
465
465
return this ;
466
466
}
467
467
} else if ( args . length === 2 ) {
468
468
const vectorComponents = args ;
469
469
if ( vectorComponents . every ( element => Number . isFinite ( element ) ) ) {
470
470
if ( vectorComponents . length === 2 ) {
471
471
return this . calculateRemainder2D (
472
- vectorComponents [ 0 ] ,
473
- vectorComponents [ 1 ]
472
+ x ,
473
+ y
474
474
) ;
475
475
}
476
476
}
@@ -479,9 +479,9 @@ p5.Vector = class {
479
479
if ( vectorComponents . every ( element => Number . isFinite ( element ) ) ) {
480
480
if ( vectorComponents . length === 3 ) {
481
481
return this . calculateRemainder3D (
482
- vectorComponents [ 0 ] ,
483
- vectorComponents [ 1 ] ,
484
- vectorComponents [ 2 ]
482
+ x ,
483
+ y ,
484
+ z
485
485
) ;
486
486
}
487
487
}
You can’t perform that action at this time.
0 commit comments