MCPcopy Create free account
hub / github.com/Atarity/Lightpack / brightnessCorrection

Function brightnessCorrection

Software/math/PrismatikMath.cpp:57–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57 void brightnessCorrection(unsigned int brightness, StructRgb & eRgb) {
58
59 // brightness -- must be in percentage (0..100%)
60 eRgb.r = (brightness / 100.0) * eRgb.r;
61 eRgb.g = (brightness / 100.0) * eRgb.g;
62 eRgb.b = (brightness / 100.0) * eRgb.b;
63 }
64
65 void maxCorrection(unsigned int max, StructRgb & eRgb) {
66 if (eRgb.r > max) eRgb.r = max;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected