// 当前值所占百分比
function getPercent(_ref) {
  var min = _ref.min,
    max = _ref.max,
    value = _ref.value;
  if (typeof min !== 'number' || typeof max !== 'number' || typeof value !== 'number') {
    return 0;
  }
  var percent = (value - min) / (max - min) * 100;
  return percent;
}
export default getPercent;