Skip to content

Commit 76d7223

Browse files
author
Lauren McCarthy
authored
Merge pull request #1550 from AkashGutha/develop
readability changes to argument in limit function.
2 parents a92a197 + 4b3195d commit 76d7223

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/math/p5.Vector.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,11 @@ p5.Vector.prototype.normalize = function () {
529529
* </code>
530530
* </div>
531531
*/
532-
p5.Vector.prototype.limit = function (l) {
532+
p5.Vector.prototype.limit = function (max) {
533533
var mSq = this.magSq();
534-
if(mSq > l*l) {
534+
if(mSq > max*max) {
535535
this.div(Math.sqrt(mSq)); //normalize it
536-
this.mult(l);
536+
this.mult(max);
537537
}
538538
return this;
539539
};

0 commit comments

Comments
 (0)