| 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 | { |