get-value-in-range

2.0.2 • Public • Published

get-value-in-range

flipactual Travis Codecov Node NPM

Calculate range adjusted values

getValueInRange(value, values) ⇒ number

Find the position of the value within a range where 0 is the minimum value and 1 is the maximum value.

Kind: global function
Returns: number - The position of the value within the range

Param Type Description
value number The value to place within the range
values number All of the values necessary to calculate the range

Example

getValueInRange(7.5, [10, 5]);
// → 0.5

Scripts

test – run the tests

npm run test

lint – lint the codebase

npm run lint

readme – generate the README

npm run readme

License

MIT @ Flip

Readme

Keywords

none

Package Sidebar

Install

npm i get-value-in-range

Weekly Downloads

1

Version

2.0.2

License

MIT

Last publish

Collaborators

  • flipactual