Here you can find the source of dotProduct(Double[] a, Double[] b)
private static Double dotProduct(Double[] a, Double[] b)
//package com.java2s; public class Main { private static Double dotProduct(Double[] a, Double[] b) { return (a[0] * b[0]) + (a[1] * b[1]); }/* w w w .j a v a 2 s . c o m*/ }