Java Array Min Value Min(final double[] input)

Here you can find the source of Min(final double[] input)

Description

Min

License

Open Source License

Declaration

public static double Min(final double[] input) 

Method Source Code

//package com.java2s;
/*/*from w w  w .  j ava2s.co m*/
 * This is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute
 * it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by
 * Sam Hocevar. See http://www.wtfpl.net/ for more details.
 */

public class Main {
    public static double Min(final double[] input) {
        if (input == null || input.length < 1) {
            return 0;
        }

        double output = input[0];
        for (int i = 1; i < input.length; i++) {
            if (input[i] < output) {
                output = input[i];
            }
        }

        return output;
    }
}

Related

  1. min(double[] values)
  2. min(double[] values)
  3. min(double[] x)
  4. min(final double... doubles)
  5. min(final Double... values)
  6. min(final double[] nums)
  7. min(final double[] tab)
  8. min(final double[] target)
  9. min(final double[] vec)