Add lerp(inverval, t)
This commit is contained in:
parent
c595c6aa72
commit
c562137218
1 changed files with 6 additions and 0 deletions
|
|
@ -232,6 +232,12 @@ namespace psemek::geom
|
||||||
return std::max(i.min, std::min(i.max, x));
|
return std::max(i.min, std::min(i.max, x));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
T lerp(interval<T> const & i, T t)
|
||||||
|
{
|
||||||
|
return i.min + i.length() * t;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Stream, typename T>
|
template <typename Stream, typename T>
|
||||||
Stream & operator << (Stream & os, interval<T> const & i)
|
Stream & operator << (Stream & os, interval<T> const & i)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue