math-bound

1.0.0 • Public • Published

Math.bound() & Number.prototype.bound()

Set boundaries to a number. The powers of Math.min() and Math.max() combined!

Syntax

Math.bound(x, min, max)

or on a number:

x.bound(min, max)

Parameters

  • x - a number
  • min - minimum value
  • max - maximum value

Install

$ npm install math-bound

License

MIT © Frontkom

Package Sidebar

Install

npm i math-bound

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • marcofernandes