Add geom::gradient default constructor
This commit is contained in:
parent
d90317576c
commit
84b804adf7
1 changed files with 4 additions and 0 deletions
|
|
@ -14,6 +14,8 @@ namespace psemek::geom
|
|||
{
|
||||
using result_type = R;
|
||||
|
||||
gradient() = default;
|
||||
|
||||
template <typename ... Args>
|
||||
gradient(Args const & ... args)
|
||||
{
|
||||
|
|
@ -29,6 +31,8 @@ namespace psemek::geom
|
|||
|
||||
R operator()(T const & t) const
|
||||
{
|
||||
assert(!points_.empty());
|
||||
|
||||
auto it = std::upper_bound(points_.begin(), points_.end(), t, [](T const & t, auto const & p){ return t < p.first; });
|
||||
if (it == points_.begin())
|
||||
return points_.front().second;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue