bool toNormalizedRGB(float& _nr, float& _ng, float& _nb) const { _nr = range(0.0f, m_r / rMax(), 1.0f); _ng = range(0.0f, m_g / gMax(), 1.0f); _nb = range(0.0f, m_b / bMax(), 1.0f); return true; }
bool fromNormalizedRGB(const float& _nr, const float& _ng, const float& _nb) { m_r = _nr * rMax(); m_g = _ng * gMax(); m_b = _nb * bMax(); return true; }
unsigned storeB() const { return roundf(range(0.0f, m_b, bMax())); }
double HSPotential::theta(const Particle& p1, const Particle& p2, double b, double g) const { return 2. * std::acos( b / bMax(p1, p2) ); }