Here you can find the source of abs(double[] in)
public static void abs(double[] in)
//package com.java2s; //License from project: Open Source License public class Main { public static void abs(float[][] in) { int width = in[0].length; int height = in.length; for (int yy = 0; yy < height; yy++) { for (int xx = 0; xx < width; xx++) { in[yy][xx] = Math.abs(in[yy][xx]); }//from w w w .j ava2 s.c om } } public static void abs(float[] in) { int height = in.length; for (int yy = 0; yy < height; yy++) { in[yy] = Math.abs(in[yy]); } } public static void abs(double[] in) { int height = in.length; for (int yy = 0; yy < height; yy++) { in[yy] = Math.abs(in[yy]); } } }