Here you can find the source of sumSquares(float[] in)
public static final float sumSquares(float[] in)
//package com.java2s; //License from project: Apache License public class Main { public static final float sumSquares(float[] in) { float sum = 0; for (int i = 0; i < in.length; i++) { sum += (in[i] * in[i]);//from w w w . ja va 2 s.co m } return sum; } public static final double sumSquares(double[] in) { float sum = 0; for (int i = 0; i < in.length; i++) { sum += (in[i] * in[i]); } return sum; } }