Here you can find the source of LengthVec3D(double[] vec)
public static double LengthVec3D(double[] vec)
//package com.java2s; //License from project: Open Source License public class Main { public static double LengthVec3D(double[] vec) { return Math.sqrt(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]); }//from ww w . java 2s. c o m }