code: public static double uniformCdf(double x, double a, double b) {
          if(a>=b) {
              throw new IllegalArgumentException("The a must be smaller than b.");
          }
          
          double probabilitySum;
          if(x<a) {
              probabilitySum=0.0;
          }
          else if(x<b) {
              probabilitySum=(x-a)/(b-a);
          }
          else {
              probabilitySum=1;
          }
  
          return probabilitySum;
      }
docs: Returns the cumulative probability of Uniform
  
  @param x
  @param a
  @param b
  @return