You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
460 B
23 lines
460 B
/*
|
|
* UTILS.JS - Basic functions for tasks
|
|
* 2019-09-25
|
|
* Rick Hays
|
|
*
|
|
*/
|
|
|
|
|
|
/*
|
|
* inRange - Tests to see if a Number is within a value range.
|
|
* @ nVal - Number - Number to test
|
|
* @ nLow - Lowest value in range
|
|
* @ nHigh - Highest value in range
|
|
*
|
|
* @ return - True/False if value is in range.
|
|
*/
|
|
function inRange(nVal, nLow, nHigh)
|
|
{
|
|
nVal = Number(nVal);
|
|
nLow = Number(nLow);
|
|
nHigh = Number(nHigh);
|
|
return (nVal >= nLow) && (nVal <= nHigh);
|
|
}
|
|
|