MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / wrap

Function wrap

libraries/rainbow/src/rainbow.cpp:34–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32// BEGIN internal helper functions
33
34static inline qreal wrap(qreal a, qreal d = 1.0)
35{
36 qreal r = fmod(a, d);
37 return (r < 0.0 ? d + r : (r > 0.0 ? r : 0.0));
38}
39
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)

Callers 1

qColorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected