Helper method to generate a list of floats between two given values.<p>

@param min the lower bound
@param max the upper bound
@param steps the number of floats to generate

@return the generated floats
504725
private List<Float> interpolateBetween(float min, float max, int steps) {

        float delta = (max - min) / (steps + 1);
        List<Float> result = new ArrayList<Float>();
        float num = min;

        for (int i = 0; i < steps; i++) {
            num += delta;
            result.add(new Float(num));
        }
        return result;
    }
49865
def generate_slices(slices, minsize, maxsize, bounded=True):
  """"""

  if isinstance(slices, integer_types) or isinstance(slices, floating_types):
    slices = [ slice(int(slices), int(slices)+1, 1) ]
  elif type(slices) == slice:
    slices = [ slices ]
  elif slices == Ellipsis:
    slices = []

  slices = list(slices)

  for index, slc in enumerate(slices):
    if slc == Ellipsis:
      fill = len(maxsize) - len(slices) + 1
      slices = slices[:index] +  (fill * [ slice(None, None, None) ]) + slices[index+1:]
      break

  while len(slices) < len(maxsize):
    slices.append( slice(None, None, None) )

  # First three slices are x,y,z, last is channel. 
  # Handle only x,y,z here, channel seperately
  for index, slc in enumerate(slices):
    if isinstance(slc, integer_types) or isinstance(slc, floating_types):
      slices[index] = slice(int(slc), int(slc)+1, 1)
    elif slc == Ellipsis:
      raise ValueError("More than one Ellipsis operator used at once.")
    else:
      start = minsize[index] if slc.start is None else slc.start
      end = maxsize[index] if slc.stop is None else slc.stop 
      step = 1 if slc.step is None else slc.step

      if step < 0:
        raise ValueError('Negative step sizes are not supported. Got: {}'.format(step))

      # note: when unbounded, negative indicies do not refer to
      # the end of the volume as they can describe, e.g. a 1px
      # border on the edge of the beginning of the dataset as in
      # marching cubes.
      if bounded:
        # if start < 0: # this is support for negative indicies
          # start = maxsize[index] + start         
        check_bounds(start, minsize[index], maxsize[index])
        # if end < 0: # this is support for negative indicies
        #   end = maxsize[index] + end
        check_bounds(end, minsize[index], maxsize[index])

      slices[index] = slice(start, end, step)

  return slices
646020
public ValidatorBuilderBigInteger<PARENT> range(BigInteger min, BigInteger max) {

    return range(new Range<>(min, max));
  }
1364239
@Pure
	public static int min(int... values) {
		if (values == null || values.length == 0) {
			return 0;
		}
		int min = values[0];
		for (final int v : values) {
			if (v < min) {
				min = v;
			}
		}
		return min;
	}
1362236
public static double min(final double[] values) {
		double min = NaN;
		if (values.length > 0) {
			min = values[0];

			for (int i = 0; i < values.length; ++i) {
				if (values[i] < min) {
					min = values[i];
				}
			}
		}

		return min;
	}
488228
public static float restrict(float value, float minValue, float maxValue) {
        return Math.max(minValue, Math.min(value, maxValue));
    }
363195
protected static int[] newKeySizeArray(int minSize, int maxSize, int step)
    {
        int[] result = new int[((maxSize - minSize) / step) + 1];
        for (int i = minSize, j = 0; i <= maxSize; i += step, j++) {
            result[j] = i;
        }
        return result;
    }
298734
def generateSteps(self, minStep):
        """"""
        self.checkFinite(minStep)

        if self.binary:
            base = 2.0
            mantissas = [1.0]
            exponent = math.floor(math.log(minStep, 2) - EPSILON)
        else:
            base = 10.0
            mantissas = [1.0, 2.0, 5.0]
            exponent = math.floor(math.log10(minStep) - EPSILON)

        while True:
            multiplier = base ** exponent
            for mantissa in mantissas:
                value = mantissa * multiplier
                if value >= minStep * (1.0 - EPSILON):
                    yield value
            exponent += 1
1005203
private QueryFieldDataStatistics createStatistics(List<Double> data, double min, double max, double step) {
    Map<Double, String> dataNames = new HashMap<>();
    
    for (double d = min; d <= max; d += step) {
      String caption = step % 1 == 0 ? Long.toString(Math.round(d)) : Double.toString(d);
      dataNames.put(d, caption);
    }
    
    return ReportUtils.getStatistics(data, dataNames);
  }
286155
public static List<Row> minMaxColumns(DataRowsFacade data, String... columns) {
        return aggregate(data, columns, new String[] {"min", "max"});
    }
967007
public void setRange( int dimension , double min , double max ) {
		valueMin[dimension] = min;
		valueMax[dimension] = max;
	}
474502
private float limit(float value, float min, float max) {
    return Math.min(Math.max(min, value), max);
  }
131578
public static int max(int[] values)
    {
        int max = Integer.MIN_VALUE;

        for (int i = 0; i < values.length; ++i)
        {
            if (max < values[i])
            {
                max = values[i];
            }
        }

        return max;
    }
631973
public static float updateFloat(float value, float range) {
		range = range == 0 ? (float) (0.1 * value) : range;
		float min = value - range;
		float max = value + range;
		return nextFloat(min, max);
	}
29175
public static <N extends Number> Number min(List<N> numberList) {
        return cal(numberList, DoubleStream::min);
    }
826823
public static function floats(float $min, float $max, int $n = 10) : array
    {
        if (($max - $min) < 0.) {
            throw new InvalidArgumentException('Maximum cannot be'
                . ' less than minimum.');
        }

        if ($n < 1) {
            throw new InvalidArgumentException('Cannot generate less'
                . ' than 1 parameter.');
        }

        $min = (int) round($min * self::PHI);
        $max = (int) round($max * self::PHI);

        $distribution = [];

        for ($i = 0; $i < $n; $i++) {
            $distribution[] = rand($min, $max) / self::PHI;
        }

        return $distribution;
    }
958835
private static ArrayList<double[]> getVisibleEdges(Projection2D proj, double[] s_min, double[] s_max) {
    final int dim = s_min.length;
    double[] s_deltas = VMath.minus(s_max, s_min);
    ArrayList<double[]> r_edges = new ArrayList<>(dim);
    for(int i = 0; i < dim; i++) {
      double[] delta = new double[dim];
      delta[i] = s_deltas[i];
      double[] deltas = proj.fastProjectRelativeDataToRenderSpace(delta);
      if(deltas[0] != 0 || deltas[1] != 0) {
        r_edges.add(deltas);
      }
    }
    return r_edges;
  }