Here you can find the source of abs(double[] in)
public static double[] abs(double[] in)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] abs(double[] in) { if (in != null && in.length > 0) { double[] out = new double[in.length]; for (int i = 0; i < in.length; i++) { out[i] = Math.abs(in[i]); }/*from www. j ava 2 s. c o m*/ return out; } else { return null; } } }