sindresorhus / math-clamp

Clamp a number
MIT License
14 stars 3 forks source link

Avoid compare with `undefined` #13

Closed fisker closed 10 months ago

fisker commented 10 months ago

Since min can be omitted, we are actually comparing number with undefined, which is confusing...

I just read the spec to understand how it works..

fisker commented 10 months ago

Not worth to add extra logic... let it confuse other people!