43 if (_v[0]<v.
_v[0])
return true;
44 else if (_v[0]>v.
_v[0])
return false;
45 else return (_v[1]<v.
_v[1]);
48 inline value_type*
ptr() {
return _v; }
49 inline const value_type*
ptr()
const {
return _v; }
51 inline void set( value_type
x, value_type
y)
58 _v[0]=rhs.
_v[0]; _v[1]=rhs.
_v[1];
64 inline value_type&
x() {
return _v[0]; }
65 inline value_type&
y() {
return _v[1]; }
67 inline value_type
x()
const {
return _v[0]; }
68 inline value_type
y()
const {
return _v[1]; }
70 inline value_type&
r() {
return _v[0]; }
71 inline value_type&
g() {
return _v[1]; }
73 inline value_type
r()
const {
return _v[0]; }
74 inline value_type
g()
const {
return _v[1]; }
103 float div = 1.0f/rhs;
111 return Vec2ub(_v[0]+rhs.
_v[0], _v[1]+rhs.
_v[1]);
127 return Vec2ub(_v[0]-rhs.
_v[0], _v[1]-rhs.
_v[1]);
143 return Vec2ub(lhs[0]*rhs[0], lhs[1]*rhs[1]);
149 return Vec2ub(lhs[0]/rhs[0], lhs[1]/rhs[1]);
Vec2ub(value_type r, value_type g)
Vec2ub operator+(const Vec2ub &rhs) const
const value_type * ptr() const
void set(const Vec2ub &rhs)
Vec2d componentDivide(const Vec2d &lhs, const Vec2d &rhs)
bool operator<(const Vec2ub &v) const
Vec2ub & operator/=(float rhs)
Vec2ub operator*(float rhs) const
Vec2ub operator/(float rhs) const
Vec2ub & operator*=(float rhs)
void set(value_type x, value_type y)
Vec2ub operator-(const Vec2ub &rhs) const
Vec2ub & operator-=(const Vec2ub &rhs)
bool operator!=(const Vec2ub &v) const
Vec2ub & operator+=(const Vec2ub &rhs)
value_type & operator[](int i)
bool operator==(const Vec2ub &v) const
Vec2d componentMultiply(const Vec2d &lhs, const Vec2d &rhs)