Here you can find the source of norm(float[] data)
public static double norm(float[] data)
//package com.java2s; //License from project: LGPL public class Main { public static double norm(float[] data) { double d = 0; for (int i = 0; i < data.length; i++) d += data[i] * data[i];// w w w.j av a 2 s. c o m return Math.sqrt(d); } }