code: public static int dot (Point v1s, Point v1e, Point v2s, Point v2e)
      {
          return ((v1e.x - v1s.x) * (v2e.x - v2s.x) + (v1e.y - v1s.y) * (v2e.y - v2s.y));
      }
docs: Computes and returns the dot product of the two vectors.
  
  @param v1s the starting point of the first vector.
  @param v1e the ending point of the first vector.
  @param v2s the starting point of the second vector.
  @param v2e the ending point of the second vector.