MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / inv

Method inv

olcPixelGameEngine.h:1967–1973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1965 }
1966
1967 Pixel Pixel::inv() const
1968 {
1969 uint8_t nR = uint8_t(std::min(255, std::max(0, 255 - int(r))));
1970 uint8_t nG = uint8_t(std::min(255, std::max(0, 255 - int(g))));
1971 uint8_t nB = uint8_t(std::min(255, std::max(0, 255 - int(b))));
1972 return Pixel(nR, nG, nB, a);
1973 }
1974
1975 Pixel PixelF(float red, float green, float blue, float alpha)
1976 {

Callers

nothing calls this directly

Calls 1

PixelClass · 0.85

Tested by

no test coverage detected