Add begin(simplex) & end(simplex)
This commit is contained in:
parent
cae538d7a5
commit
29e62192ce
1 changed files with 24 additions and 0 deletions
|
|
@ -30,6 +30,30 @@ namespace psemek::geom
|
|||
template <typename ... Args>
|
||||
simplex(Args ...) -> simplex<std::common_type_t<Args...>, sizeof...(Args) - 1>;
|
||||
|
||||
template <typename Point, std::size_t K>
|
||||
auto begin(simplex<Point, K> & s)
|
||||
{
|
||||
return std::begin(s.points);
|
||||
}
|
||||
|
||||
template <typename Point, std::size_t K>
|
||||
auto begin(simplex<Point, K> const & s)
|
||||
{
|
||||
return std::begin(s.points);
|
||||
}
|
||||
|
||||
template <typename Point, std::size_t K>
|
||||
auto end(simplex<Point, K> & s)
|
||||
{
|
||||
return std::end(s.points);
|
||||
}
|
||||
|
||||
template <typename Point, std::size_t K>
|
||||
auto end(simplex<Point, K> const & s)
|
||||
{
|
||||
return std::end(s.points);
|
||||
}
|
||||
|
||||
template <typename Point>
|
||||
using segment = simplex<Point, 1>;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue