mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
util: Add is_close function
This commit is contained in:
parent
5279993f4b
commit
61c143a0c8
1 changed files with 6 additions and 0 deletions
|
@ -181,6 +181,12 @@ namespace streamfx::util {
|
|||
&& (target < (value + std::numeric_limits<T>::epsilon()));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline bool is_close(T target, T value, T delta)
|
||||
{
|
||||
return (target > (value - delta)) && (target < (value + delta));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline std::vector<T> pascal_triangle(size_t n)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue