MCPcopy Create free account
hub / github.com/RenderKit/oidn / clamp

Function clamp

core/math.h:66–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64
65 template<typename T>
66 oidn_host_device_inline T clamp(T x, T minVal, T maxVal)
67 {
68 return min(max(x, minVal), maxVal);
69 }
70
71 oidn_host_device_inline float to_float_unorm(uint32_t x)
72 {

Callers

nothing calls this directly

Calls 2

minFunction · 0.70
maxFunction · 0.70

Tested by

no test coverage detected