message: Cleaner clamping of value range
diff: @@ -34,18 +34,13 @@ type IProps = {
  export default class Slider extends React.Component<IProps> {
  _offset(values: number[], value: number): number {
  - const lowest = values[0];
  - const highest = values[values.length - 1];
  + const min = values[0];
  + const max = values[values.length - 1];
  - if (value < lowest) {
  - return 0;
  - }
  -
  - if (value > highest) {
  - return 100;
  - }
  + // Clamp value between min and max
  + value = Math.min(Math.max(value, min), max);
  - return (value - values[0]) / (values[values.length - 1] - values[0]) * 100;
  + return (value - min) / (max - min) * 100;
  }
  render(): React.ReactNode {
  