src/main/java/ucar/geoapi/NetcdfProjection.java
private static boolean needsCopy(final int srcOff, final int srcDim, final int dstOff, final int dstDim, final int numPts) {
        if (numPts <= 1) {
            return false;
        }
        int ΔOff = srcOff - dstOff;
        if (ΔOff >= 0) {
            final int ΔDim = srcDim - dstDim;
            if (ΔDim >= 0 || ΔOff >= (1-numPts)*ΔDim) {
                return false;
            }
        } else {
            ΔOff = -ΔOff;
            if (ΔOff >= numPts*srcDim) {
                return false;
            }
        }
        return true;
    }
/**
     * Returns {@code true} if the source array need to be copied before to write in the target array.
     * This method can be invoked if:
     *
     * <ul>
     *   <li>The source array and the target array are the same array
     *       (note that it can never be the case if the arrays are not of the same type)</li>
     *   <li>Each source coordinate is read atomically, and each target coordinate is written atomically
     *       (i.e. no target ordinate is written before the source ordinates are fully read)</li>
     *   <li>The coordinates are read and written in increasing array index order.</li>
     * </ul>
     *
     * @param  srcOff  the offset in the source coordinate array.
     * @param  srcDim  the dimension of input points.
     * @param  dstOff  the offset in the destination coordinate array.
     * @param  dstDim  the dimension of output points.
     * @param  numPts  the number of points to transform.
     * @return {@code true} if the source array needs to be copied.
     */
Returns  true if the source array need to be copied before to write in the target array.
This method can be invoked if.


The source array and the target array are the same array
(note that it can never be the case if the arrays are not of the same type)
Each source coordinate is read atomically, and each target coordinate is written atomically

The coordinates are read and written in increasing array index order.


@param  srcOff  the offset in the source coordinate array.
@param  srcDim  the dimension of input points.
@param  dstOff  the offset in the destination coordinate array.
@param  dstDim  the dimension of output points.
@param  numPts  the number of points to transform.
@return  true if the source array needs to be copied.
Returns true if the source array need to be copied before to write in the target array . This method can be invoked if . The source array and the target array are the same array ( note that it can never be the case if the arrays are not of the same type ) Each source coordinate is read atomically and each target coordinate is written atomically The coordinates are read and written in increasing array index order . @param srcOff the offset in the source coordinate array . @param srcDim the dimension of input points . @param dstOff the offset in the destination coordinate array . @param dstDim the dimension of output points . @param numPts the number of points to transform . @return true if the source array needs to be copied .
private static boolean needsCopy(final int srcOff, final int srcDim, final int dstOff, final int dstDim, final int numPts) {
        if (numPts <= 1) {
            return false;
        }
        int ΔOff = srcOff - dstOff;
        if (ΔOff >= 0) {
            final int ΔDim = srcDim - dstDim;
            if (ΔDim >= 0 || ΔOff >= (1-numPts)*ΔDim) {
                return false;
            }
        } else {
            ΔOff = -ΔOff;
            if (ΔOff >= numPts*srcDim) {
                return false;
            }
        }
        return true;
    }
private static boolean needsCopy ( final int srcOff , final int srcDim , final int dstOff , final int dstDim , final int numPts ) { if ( numPts <= 1 ) { return false ; } int ΔOff  rcOff  stOff; if ( ΔOff  =  ) final int ΔDim  rcDim  stDim; if ( ΔDim  =  |  Off >  ( - n u mPts)* Δ D im) { return false ; } } else { ΔOff  Δ Off; if ( ΔOff  =  umPts* s rcDim) return false ; } } return true ; }
Returns {@code true} if the source array need to be copied before to write in the target array.
Returns { @code true } if the source array need to be copied before to write in the target array .