Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make clip(X) mean clip(X, 0, X)

  • Loading branch information...
commit 2fc0276375d2d0d34154105797e669f742293d91 1 parent 9fe9eac
@marcuswestin authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  clip.js
View
2  clip.js
@@ -1,3 +1,3 @@
module.exports = function clip(val, min, max) {
- return Math.max(Math.min(val, max || val), min)
+ return Math.max(Math.min(val, max || val), min || 0)
}
Please sign in to comment.
Something went wrong with that request. Please try again.