Make geom::swizzle work for boxes
This commit is contained in:
parent
23f818078f
commit
cac70befe5
1 changed files with 2 additions and 1 deletions
|
|
@ -24,7 +24,8 @@ namespace psemek::geom
|
|||
template <std::size_t ... I>
|
||||
constexpr auto swizzle = [](auto const & x){
|
||||
using result = typename detail::swizzle_rebind<std::decay_t<decltype(x)>>::template type<sizeof...(I)>;
|
||||
return result{(I == (-1) ? 0 : x[I])...};
|
||||
using element = std::decay_t<decltype(x[0])>;
|
||||
return result{(I == (-1) ? element{} : x[I])...};
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue