Java examples for java.lang:Math Trigonometric Function
euclidian Distance
//package com.java2s; public class Main { public static double euclidianDistance(double[] doubles1, double[] doubles2) { double result = 0; for (int i = 0; i < doubles1.length; i++) { result += Math.pow(doubles1[i] - doubles2[i], 2); }/*www .ja v a2s . c om*/ return Math.sqrt(result); } }