Here you can find the source of arrayMin(double minVal, double[] vals)
Parameter | Description |
---|---|
values | a parameter |
public static double[] arrayMin(double minVal, double[] vals)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w w w . ja va 2 s . com*/ * Applies a min value to all elements in an array * @param values * @return */ public static double[] arrayMin(double minVal, double[] vals) { double[] out = new double[vals.length]; for (int i = 0; i < vals.length; i++) { out[i] = Math.min(minVal, vals[i]); } return out; } }