56 explicit unorm16(
const class Any& a);
62 m_bits =
uint16(
clamp(f, 0.0f, 1.0f) * 65535.0f + 0.5f);
66 m_bits =
uint16(
clamp(f, 0.0, 1.0) * 65535.0 + 0.5);
70 operator float()
const {
71 return float(m_bits) * (1.0f / 65535.0f);
74 operator double()
const {
75 return double(m_bits) * (1.0 / 65535.0);
99 return m_bits > other.m_bits;
103 return m_bits < other.m_bits;
107 return m_bits >= other.m_bits;
111 return m_bits <= other.m_bits;
115 return m_bits <= other.m_bits;
119 return m_bits != other.m_bits;
127 m_bits += other.m_bits;
136 m_bits -= other.m_bits;
180 #endif // G3D_unorm16
unorm16 & operator>>=(const int i)
Definition: unorm16.h:171
unorm16 operator-(const unorm16 other) const
Definition: unorm16.h:131
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
uint16_t uint16
Definition: g3dmath.h:166
unorm16
Definition: unorm16.h:32
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
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
#define const
Definition: zconf.h:217
G3D::Color3 operator*(float s, const G3D::Color3 &c)
Definition: Color3.h:275
uint16 reinterpretAsUInt16() const
Returns the underlying bits in this representation. Equivalent to:
Definition: unorm16.h:94