Here you can find the source of prodEscalar(Point2D p1, Point2D p2)
private static double prodEscalar(Point2D p1, Point2D p2)
//package com.java2s; //License from project: Open Source License import java.awt.geom.*; public class Main { private static double prodEscalar(Point2D p1, Point2D p2) { double d = p1.getX() * p2.getX() + p1.getY() * p2.getY(); return d; }/*www . jav a 2 s.c om*/ }