clone method

Ray2 clone()

Deep clones the object, i.e. both origin and direction are cloned into a new Ray2 object.

Implementation

Ray2 clone() => Ray2(origin: origin.clone(), direction: direction.clone());