export var bindToMinMax = function bindToMinMax(value, min, max) {
  return Math.min(Math.max(value, min), max);
};
export var parseValue = function parseValue(value, min, max) {
  return bindToMinMax(toNumber(value), min, max);
};
export var toNumber = function toNumber(rawNumber) {
  var number = parseFloat(rawNumber);

  if (isNaN(number) || !isFinite(number)) {
    number = 0;
  }

  return number;
};