andrewplummer/Sugar — pull request #304 by kevincox (2013-04-05 03:11:10+00:00)
Title: Added number bounding functions.

Allows easy restriction of a numbers range.

x.bound(min, max);

Returns the closest number to `x` that is larger then `min` and larger then `max`.

x.cap(max);

Convenience method of only specifying the high bound.