public double cross(Point b) {
   return x() * b.y() - y() * b.x();
 }
 public double dot(Point b) {
   return x() * b.x() + y() * b.y();
 }