4 ms·
One way of getting symmetricity in C++ using the first approach is to do something like this: if (a->intersect(b)) return; if (b->intersect(a)) return; general
by jleahy 9y ago
One way of getting symmetricity in C++ using the first approach is to do something like this:
if (a->intersect(b)) return;
if (b->intersect(a)) return;
general_intersect(a, b);
(making the base version return false, and adding return true to any overrides)
This way you would only need to add the Ellipse/HyperFrob specialization to the HyperFrob class.