code: public void setRange(double A, double B)
      {
          if(A == B)
              throw new RuntimeException("Values must be different");
          else if(B > A)
          {
              double tmp = A;
              A = B;
              B = tmp;
          }
          this.A = A;
          this.B = B;
      }
docs: Sets the min and max value to scale the data to. If given in the wrong order, this method will swap them
  @param A the maximum value for the transformed data set
  @param B the minimum value for the transformed data set