54 if (_v[0]<v.
_v[0])
return true;
55 else if (_v[0]>v.
_v[0])
return false;
56 else return (_v[1]<v.
_v[1]);
59 inline value_type*
ptr() {
return _v; }
60 inline const value_type*
ptr()
const {
return _v; }
62 inline void set( value_type
x, value_type
y)
69 _v[0]=rhs.
_v[0]; _v[1]=rhs.
_v[1];
75 inline value_type&
x() {
return _v[0]; }
76 inline value_type&
y() {
return _v[1]; }
78 inline value_type
x()
const {
return _v[0]; }
79 inline value_type
y()
const {
return _v[1]; }
81 inline value_type&
r() {
return _v[0]; }
82 inline value_type&
g() {
return _v[1]; }
84 inline value_type
r()
const {
return _v[0]; }
85 inline value_type
g()
const {
return _v[1]; }
114 float div = 1.0f/rhs;
122 return Vec2b(_v[0]+rhs.
_v[0], _v[1]+rhs.
_v[1]);
138 return Vec2b(_v[0]-rhs.
_v[0], _v[1]-rhs.
_v[1]);
Vec2b & operator-=(const Vec2b &rhs)
void set(value_type x, value_type y)
Vec2b & operator+=(const Vec2b &rhs)
bool operator<(const Vec2b &v) const
Vec2b operator+(const Vec2b &rhs) const
const value_type * ptr() const
Vec2b & operator*=(float rhs)
value_type & operator[](int i)
Vec2b operator/(float rhs) const
Vec2b & operator/=(float rhs)
bool operator==(const Vec2b &v) const
Vec2b operator*(float rhs) const
Vec2b operator-(const Vec2b &rhs) const
Vec2b(value_type r, value_type g)
void set(const Vec2b &rhs)
bool operator!=(const Vec2b &v) const