module/src/utils.js
/**
 * Normalize a value within a specified domain, such that values outside of
 * this domain are converted to their equivalent in-range value.
 * @param  {number} lower - the lower bound of the domain
 * @param  {number} upper - the upper bound of the domain
 * @return {number}
 */
Normalize a value within a specified domain, such that values outside of
this domain are converted to their equivalent in-range value.
@param  {number} lower - the lower bound of the domain
@param  {number} upper - the upper bound of the domain
@return {number}
Normalize a value within a specified domain such that values outside of this domain are converted to their equivalent in - range value . @param { number } lower - the lower bound of the domain @param { number } upper - the upper bound of the domain @return { number }
function normalizeWithinDomain(lower, upper) {
    let value = Number(this);
    const range = upper - lower;
    value %= range;
    if (value < lower) {
        value += range;
    }
    return value;
}
function normalizeWithinDomain ( lower , upper ) { let value = Number ( this ) ; const range = upper - lower ; value %= range ; if ( value < lower ) { value += range ; } return value ; }
Normalize a value within a specified domain, such that values outside of
 this domain are converted to their equivalent in-range value.
Normalize a value within a specified domain such that values outside of this domain are converted to their equivalent in - range value .