Here you can find the source of invert(double[] ary)
public static double[] invert(double[] ary)
//package com.java2s; //License from project: Apache License public class Main { public static double[] invert(double[] ary) { if (ary == null) return null; for (int i = 0; i < ary.length; i++) ary[i] = 1. / ary[i];/*from www . j a va 2 s . c o m*/ return ary; } }