2.0.2 • Published 7 years ago

get-value-in-range v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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

ParamTypeDescription
valuenumberThe value to place within the range
valuesnumberAll 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

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.5

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

8 years ago