59 m_bits = (
uint8)(
clamp(f, 0.0f, 1.0f) * 255.0f + 0.5f);
63 m_bits =
iClamp(
int(f * 255.0f + 0.5f), 0, 255);
67 operator float()
const {
68 return float(m_bits) * (1.0f / 255.0f);
71 operator double()
const {
72 return double(m_bits) * (1.0 / 255.0);
96 return m_bits > other.m_bits;
100 return m_bits < other.m_bits;
104 return m_bits >= other.m_bits;
108 return m_bits <= other.m_bits;
112 return m_bits <= other.m_bits;
116 return m_bits != other.m_bits;
124 m_bits += other.m_bits;
133 m_bits -= other.m_bits;
unorm8
Definition: unorm8.h:33
unorm16 & operator>>=(const int i)
Definition: unorm16.h:171
unorm16 operator-(const unorm16 other) const
Definition: unorm16.h:131
uint8 reinterpretAsUInt8() const
Returns the underlying bits in this representation. Equivalent to:
Definition: unorm8.h:91
unorm16 & operator+=(const unorm16 other)
Definition: unorm16.h:126
unorm16 & operator<<=(const int i)
Definition: unorm16.h:162
unorm16 & operator/=(const int i)
Definition: unorm16.h:153
bool operator!=(const NetAddress &a, const NetAddress &b)
Definition: NetAddress.h:128
bool operator<=(const unorm16 other) const
Definition: unorm16.h:110
static unorm16 fromBits(uint16 b)
Definition: unorm16.h:43
unorm16 operator+(const unorm16 other) const
Definition: unorm16.h:122
static unorm16 reinterpretFrom(uint16 b)
Definition: unorm16.h:48
bool operator<(const unorm16 other) const
Definition: unorm16.h:102
double clamp(double val, double low, double hi)
Definition: g3dmath.h:571
G3D::Color3 operator/(float s, const G3D::Color3 &c)
Definition: Color3.h:287
bool operator==(const NetAddress &a, const NetAddress &b)
Definition: NetAddress.h:123
static unorm16 one()
Definition: unorm16.h:78
unorm16 & operator-=(const unorm16 other)
Definition: unorm16.h:135
unorm16 & operator*=(const int i)
Definition: unorm16.h:144
uint16 bits() const
Returns the underlying bits in this representation. Equivalent to:
Definition: unorm16.h:89
bool operator>=(const unorm16 other) const
Definition: unorm16.h:106
uint8_t uint8
Definition: g3dmath.h:164
bool operator>(const unorm16 other) const
Definition: unorm16.h:98
std::ostream & operator<<(std::ostream &os, const NetAddress &)
Definition: NetworkDevice.cpp:26
unorm16 operator>>(const int i) const
Definition: unorm16.h:167
static unorm16 zero()
Definition: unorm16.h:82
uint8_t uint8
Definition: Define.h:152
int iClamp(int val, int low, int hi)
Definition: g3dmath.h:545
G3D::Color3 operator*(float s, const G3D::Color3 &c)
Definition: Color3.h:275