Computes the dot product with another point.
num dotProduct(Point<num> other) => (x * other.x) + (y * other.y);