List of usage examples for org.apache.commons.math4.util FastMath sqrt
public static double sqrt(final double a)
From source file:com.ericbarnhill.arrayMath.ArrayMath.java
/** * In-place element-wise {@code sqrt} of a {@code double[]}. Returns reference to first passed array. */*from w ww. jav a2 s. c o m*/ * @param f {@code double[]} array. * @return {@code double[]} array. * * @since 0.1 */ public static double[] sqrt(double[] f) { final int fi = f.length; for (int i = 0; i < fi; i++) { f[i] = FastMath.sqrt(f[i]); } return f; }