Add math::cast(ray)
This commit is contained in:
parent
a42d025ffb
commit
7beba986ae
1 changed files with 6 additions and 0 deletions
|
|
@ -58,6 +58,12 @@ namespace psemek::math
|
|||
return res;
|
||||
}
|
||||
|
||||
template <typename T1, typename T, std::size_t N>
|
||||
ray<T1, N> cast(ray<T, N> const & r)
|
||||
{
|
||||
return {cast<T1>(r.origin), cast<T1>(r.direction)};
|
||||
}
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
std::ostream & operator << (std::ostream & os, ray<T, N> const & r)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue