#include <algorithm>
Go to the source code of this file.
|
template<typename T > |
static constexpr const T & | SkTPin (const T &x, const T &lo, const T &hi) |
|
◆ SkTPin()
static constexpr const T & SkTPin |
( |
const T & |
x, |
|
|
const T & |
lo, |
|
|
const T & |
hi |
|
) |
| |
|
staticconstexpr |
- Returns
- x pinned (clamped) between lo and hi, inclusively.
Unlike std::clamp(), SkTPin() always returns a value between lo and hi. If x is NaN, SkTPin() returns lo but std::clamp() returns NaN.
Definition at line 19 of file SkTPin.h.
19 {
21}
static float max(float r, float g, float b)
static float min(float r, float g, float b)