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

Method operator /

olcPixelGameEngine.h:1893–1899  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1891 }
1892
1893 Pixel Pixel::operator / (const float i) const
1894 {
1895 float fR = std::min(255.0f, std::max(0.0f, float(r) / i));
1896 float fG = std::min(255.0f, std::max(0.0f, float(g) / i));
1897 float fB = std::min(255.0f, std::max(0.0f, float(b) / i));
1898 return Pixel(uint8_t(fR), uint8_t(fG), uint8_t(fB), a);
1899 }
1900
1901 Pixel& Pixel::operator *=(const float i)
1902 {

Callers

nothing calls this directly

Calls 1

PixelClass · 0.85

Tested by

no test coverage detected