diff --git a/geom/aabb.hpp b/geom/aabb.hpp index 86c18dbd..94b5e7f5 100644 --- a/geom/aabb.hpp +++ b/geom/aabb.hpp @@ -34,6 +34,21 @@ namespace cruft::geom { } + /////////////////////////////////////////////////////////////////////// + /// Returns a copy of the AABB with all elements implicitly cast to the + /// type `DestinationT`. + template + constexpr aabb + cast (void) const + { + return { + lo.template cast (), + hi.template cast () + }; + } + + + /////////////////////////////////////////////////////////////////////// extent magnitude (void) const