From 7beba986aeeb36f9aae10de5ea8dc8730f38132f Mon Sep 17 00:00:00 2001 From: lisyarus Date: Sun, 14 Sep 2025 00:02:28 +0300 Subject: [PATCH] Add math::cast(ray) --- libs/math/include/psemek/math/ray.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/math/include/psemek/math/ray.hpp b/libs/math/include/psemek/math/ray.hpp index c517d9dd..7611c51d 100644 --- a/libs/math/include/psemek/math/ray.hpp +++ b/libs/math/include/psemek/math/ray.hpp @@ -58,6 +58,12 @@ namespace psemek::math return res; } + template + ray cast(ray const & r) + { + return {cast(r.origin), cast(r.direction)}; + } + template std::ostream & operator << (std::ostream & os, ray const & r) {