23 #ifndef _GLIBCXX_CMATH
26 #ifndef _GLIBCXX_ALGORITHM
31 #define aw_assert(bed) arb_assert(bed)
41 void rescale(uint16_t my_max);
46 AW_rgb16(uint16_t red, uint16_t green, uint16_t blue) : R(red), G(green), B(blue) {}
47 explicit AW_rgb16(
const char *colorname);
58 uint16_t
r()
const {
return R; }
59 uint16_t
g()
const {
return G; }
60 uint16_t
b()
const {
return B; }
62 const char *
ascii()
const;
68 static bool is_normal(
const float& f) {
return f >= 0.0 && f<=1.0; }
69 static const float& normal(
const float& f) {
aw_assert(is_normal(f));
return f; }
90 #else // !defined(Cxx11)
94 float r()
const {
return R; }
95 float g()
const {
return G; }
96 float b()
const {
return B; }
160 #error aw_rgb.hxx included twice
AW_rgb_diff max(const AW_rgb_diff &d1, const AW_rgb_diff &d2)
AW_rgb_normalized(void *, float red, float green, float blue)
AW_rgb_diff operator*(const AW_rgb_diff &d, const float &f)
AW_rgb_normalized(const AW_rgb16 &o)
static CONSTEXPR float MAX
bool operator!=(const AW_rgb16 &o) const
const char * ascii() const
float avoid_overflow(float f)
AW_rgb_normalized(const char *colorname)
AW_rgb16(uint16_t red, uint16_t green, uint16_t blue)
AW_rgb_diff operator-(const AW_rgb_normalized &c1, const AW_rgb_normalized &c2)
AW_rgb_diff(float red, float green, float blue)
bool operator==(const AW_rgb16 &o) const
AW_rgb_diff operator+(const AW_rgb_diff &d1, const AW_rgb_diff &d2)
AW_rgb_normalized(float red, float green, float blue)