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

Method operator *

olcPixelGameEngine.h:1885–1891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1883 }
1884
1885 Pixel Pixel::operator * (const float i) const
1886 {
1887 float fR = std::min(255.0f, std::max(0.0f, float(r) * i));
1888 float fG = std::min(255.0f, std::max(0.0f, float(g) * i));
1889 float fB = std::min(255.0f, std::max(0.0f, float(b) * i));
1890 return Pixel(uint8_t(fR), uint8_t(fG), uint8_t(fB), a);
1891 }
1892
1893 Pixel Pixel::operator / (const float i) const
1894 {

Callers

nothing calls this directly

Calls 1

PixelClass · 0.85

Tested by

no test coverage detected