Add geom::cast(quaternion)
This commit is contained in:
parent
a26826fc03
commit
d179ef65a2
1 changed files with 6 additions and 0 deletions
|
|
@ -305,6 +305,12 @@ namespace psemek::geom
|
|||
return quaternion<T>{{v[0], v[1], v[2], std::log(n)}};
|
||||
}
|
||||
|
||||
template <typename T, typename H>
|
||||
quaternion<T> cast(quaternion<H> const & q)
|
||||
{
|
||||
return {cast<T>(q.coords)};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::ostream & operator << (std::ostream & os, quaternion<T> const & q)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue