Checks to see if a value is a negative number
@param {number} lower - the lower boundary value to check against
@param {number} upper - the upper boundary value to check against
@returns {function} - a validator function
@memberof vet.numbers
192965
function isBetween(lower, upper) {
	return function (val) {
		return isNumber(val) && val > lower && val < upper;
	}
}
826558
function( name, upper, lower ) {
		return this.ok( name, upper > lower, this.greaterThan, "\nUpper Value '" + upper + "' is not greater than lower value '" + lower + "'" );
	}
1066117
function isTruthy(val) {
    if (!isValue(val))
        return false;
    if (typeof val === 'number')
        return val > 0;
    if (isString(val) && !val.length)
        return false;
    return (val !== false &&
        val !== isNaN(val));
}
685305
def _limit_value(value, upper=1.0, lower=0.0):
    
    if value > upper:
        return(upper)
    if value < lower:
        return(lower)
    return value
734804
function isNumberString(value) {
    let numberReg = /^((-?\d*\.?\d*(?:e[+-]?\d*(?:\d?\.?|\.?\d?)\d*)?)|(0[0-7]+)|(0x[0-9a-f]+))$/i;
    return lodash.isString(value) && !isEmpty(value) && numberReg.test(value);
}
537302
function baseClamp(number, lower, upper) {
      if (number === number) {
        if (upper !== undefined$1) {
          number = number <= upper ? number : upper;
        }
        if (lower !== undefined$1) {
          number = number >= lower ? number : lower;
        }
      }
      return number;
    }
1001682
public static FormValidation validateIntegerInRange(String value, int lower, int upper) {
        try {
            int intValue = Integer.parseInt(value);
            if (intValue < lower) {
                return error(hudson.model.Messages.Hudson_MustBeAtLeast(lower));
            }
            if (intValue > upper) {
                return error(hudson.model.Messages.Hudson_MustBeAtMost(upper));
            }
            return ok();
        } catch (NumberFormatException e) {
            return error(hudson.model.Messages.Hudson_NotANumber());
        }
    }
374392
def is_valid_interval(self, lower, upper):
        """"""
        try:
            lower_idx = self.data.index(lower)
            upper_idx = self.data.index(upper)
            return (lower_idx, upper_idx) if lower_idx <= upper_idx else False
        except ValueError:
            return False
154392
public void setLowerAndUpperBounds(double lower, double upper) {
        if (data == null) {
            return;
        }

        this.originalLowerBound = lower;
        this.originalUpperBound = upper;
        if (originalLowerBound < min) {
            offset = Math.abs(originalLowerBound) + 10;
        } else {
            offset = Math.abs(min) + 10;
        }

        if (calibrationType == MEAN) {
            lowerBound = (originalLowerBound + offset) * (mean + offset) / (min + offset) - offset;
            upperBound = (originalUpperBound + offset) * (mean + offset) / (max + offset) - offset;
        } else {
            lowerBound = originalLowerBound;
            upperBound = originalUpperBound;
        }
        hasBounds = true;
        setDeviation();
    }
371837
function compareNumericWithNaNs(x, y) {
    if (!isNaN(x) && !isNaN(y))
      return x - y;
    if (isNaN(x))
      return 1;
    if (isNaN(y))
      return -1;
    return 0;
  }
1073495
function isValid(checkNumber) {
    if (checkNumber == null) {
      return false;
    }
    var numbers = _splitDigits(checkNumber);
    return numbers.pop() === checkSum(numbers.join(''));
  }
1132074
function toNumber(value) {
        var _this = this;

        if (validateHelpers.isArray(value)) {
            return value.map(function (a) {
                return _this.toNumber(a);
            });
        }

        var number = parseFloat(value);

        if (number === undefined) {
            return value;
        }

        if (number.toString().length !== value.toString().length && !validateHelpers.isNumeric(value)) {
            return value;
        }

        return validateHelpers.isNumber(number) ? value : number;
    }
1348910
def check(self, value, major):
        
        if self._min is not None and value < self._min:
            raise ValueError("Integer %d is lower than minimum %d."
                             % (value, self._min))
        if self._max is not None and value > self._max:
            raise ValueError("Integer %d is higher than maximum %d."
                             % (value, self._max))
340251
function in_range(key, low, high) {
    //return (low < high && key > low && key < high) ||
    //    (low > high && (key > low || key < high)) ||
    //    (low === high && key !== low);
    return (less_than(low, high) && less_than(low, key) && less_than(key, high)) ||
        (less_than(high, low) && (less_than(low, key) || less_than(key, high))) ||
        (equal_to(low, high) && !equal_to(key, low));
}
1337423
function isNumber( value ) {
	return ( typeof value === 'number' || Object.prototype.toString.call( value ) === '[object Number]' ) && value.valueOf() === value.valueOf();
}
862994
def _clip(value, lower, upper):
    
    return lower if value < lower else upper if value > upper else value
406564
function (str) {
            
            var typeOf = typeof str;
            if (typeOf === 'number')
                return str;
            
            else if (typeOf !== 'string')
                return Number.NaN;
            
            else if (_floatRegex.test(str))
                return parseFloat(str);
                
            else if (   str === 'Infinity'
                     || str === '+Infinity' )
                return Number.POSITIVE_INFINITY;
            
            else if (str === '-Infinity')
                return Number.NEGATIVE_INFINITY;
            
            else  // whether "NaN" or any other string
                return Number.NaN;
        }