docs: public static double Scale(DoubleRange from, DoubleRange to, int x) {
          if (from.length() == 0) return 0;
          return ((to.length()) * (x - from.getMin()) / from.length() + to.getMin());
      }