Here you can find the source of abs(double[] da)
Parameter | Description |
---|---|
da | - the input double array. |
public static double[] abs(double[] da)
//package com.java2s; public class Main { /**/*from w ww . j a v a 2 s. com*/ * @param da - the input double array. * @return the absolute value for an array of doubles */ public static double[] abs(double[] da) { double[] out = da.clone(); for (int i = 0; i < out.length; i++) { out[i] = Math.abs(out[i]); } return out; } }