MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / operator -

Method operator -

olcPixelGameEngine.h:1925–1931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1923 }
1924
1925 Pixel Pixel::operator - (const Pixel& p) const
1926 {
1927 uint8_t nR = uint8_t(std::min(255, std::max(0, int(r) - int(p.r))));
1928 uint8_t nG = uint8_t(std::min(255, std::max(0, int(g) - int(p.g))));
1929 uint8_t nB = uint8_t(std::min(255, std::max(0, int(b) - int(p.b))));
1930 return Pixel(nR, nG, nB, a);
1931 }
1932
1933 Pixel& Pixel::operator += (const Pixel& p)
1934 {

Callers

nothing calls this directly

Calls 1

PixelClass · 0.85

Tested by

no test coverage detected