equals method

bool equals(
  1. Ray ray
)

Implementation

bool equals(Ray ray) {
  return ray.origin.equals(origin) && ray.direction.equals(direction);
}