Java Array Min Value min(final float[] a, final float[] b)

Here you can find the source of min(final float[] a, final float[] b)

Description

Writes min(a,b) into a

License

Open Source License

Parameter

Parameter Description
a a parameter
b a parameter

Declaration

final static public void min(final float[] a, final float[] b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from w  w w . j  ava  2 s .c om
     * Writes min(a,b) into a
     *
     * @param a
     * @param b
     */
    final static public void min(final float[] a, final float[] b) {
        for (int i = 0; i < a.length; ++i)
            if (b[i] < a[i])
                a[i] = b[i];
    }

    /**
     * Writes min(a,b) into a
     *
     * @param a
     * @param b
     */
    final static public void min(final double[] a, final double[] b) {
        for (int i = 0; i < a.length; ++i)
            if (b[i] < a[i])
                a[i] = b[i];
    }
}

Related

  1. min(final double[] nums)
  2. min(final double[] tab)
  3. min(final double[] target)
  4. min(final double[] vec)
  5. min(final double[] vector)
  6. min(final int... array)
  7. min(final int... integers)
  8. min(final int... numbers)
  9. min(final int... values)