MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / normalize

Function normalize

libraries/rainbow/src/rainbow.cpp:42–45  ·  view source on GitHub ↗

normalize: like qBound(a, 0.0, 1.0) but without needing the args and with "safer" behavior on NaN (isnan(a) -> return 0.0)

Source from the content-addressed store, hash-verified

40// normalize: like qBound(a, 0.0, 1.0) but without needing the args and with
41// "safer" behavior on NaN (isnan(a) -> return 0.0)
42static inline qreal normalize(qreal a)
43{
44 return (a < 1.0 ? (a > 0.0 ? a : 0.0) : 1.0);
45}
46
47///////////////////////////////////////////////////////////////////////////////
48// HCY color space

Callers 6

qColorMethod · 0.85
gammaMethod · 0.85
igammaMethod · 0.85
lightenMethod · 0.85
darkenMethod · 0.85
shadeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected