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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2

Package Sidebar

Install

npm i math-bound

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • marcofernandes