Example usage for org.apache.commons.math.util FastMath min

List of usage examples for org.apache.commons.math.util FastMath min

Introduction

In this page you can find the example usage for org.apache.commons.math.util FastMath min.

Prototype

public static double min(final double a, final double b) 

Source Link

Document

Compute the minimum of two values

Usage

From source file:com.bc.util.ObjectArray.java

public void set(ObjectArray array) {
    final int start = FastMath.max(_minIndex, array.getMinIndex());
    final int end = FastMath.min(_maxIndex, array.getMaxIndex());

    if (end < start) {
        return;/*from   w  ww  .j a  v a 2  s  . co m*/
    }

    final int srcPos = start - array.getMinIndex();
    final int destPos = start - _minIndex;
    System.arraycopy(array._objects, srcPos, _objects, destPos, end - start + 1);
}