code: public static int dot (Point vs, Point v1e, Point v2e)
      {
          return ((v1e.x - vs.x) * (v2e.x - vs.x) + (v1e.y - vs.y) * (v2e.y - vs.y));
      }
docs: Computes and returns the dot product of the two vectors. The vectors are assumed to start
  with the same coordinate and end with different coordinates.
  
  @param vs the starting point of both vectors.
  @param v1e the ending point of the first vector.
  @param v2e the ending point of the second vector.