19 #ifndef GEOM_VECMAT2_OP_HH
20 #define GEOM_VECMAT2_OP_HH
37 return v[0]*v[0]+v[1]*v[1];
49 return std::fabs(v1[0]-v2[0])<ephilon &&
50 std::fabs(v1[1]-v2[1])<ephilon;
56 return std::fabs(m1(0,0)-m2(0,0))<ephilon &&
57 std::fabs(m1(0,1)-m2(0,1))<ephilon &&
58 std::fabs(m1(1,0)-m2(1,0))<ephilon &&
59 std::fabs(m1(1,1)-m2(1,1))<ephilon;
65 return v1[0]*v2[0]+v1[1]*v2[1];
81 Vec2 nrvo(v1[0]*v2[0],v1[1]*v2[1]);
88 Vec2 nrvo(v1[0]/v2[0],v1[1]/v2[1]);
101 Vec2 nrvo(v[0]*m(0,0)+v[1]*m(1,0),
102 v[0]*m(0,1)+v[1]*m(1,1));
115 Vec2 nrvo(v[0]*m(0,0)+v[1]*m(0,1),
116 v[0]*m(1,0)+v[1]*m(1,1));
136 Mat2 nrvo(m1(0,0)*m2(0,0)+m1(0,1)*m2(1,0),
137 m1(0,0)*m2(0,1)+m1(0,1)*m2(1,1),
138 m1(1,0)*m2(0,0)+m1(1,1)*m2(1,0),
139 m1(1,0)*m2(0,1)+m1(1,1)*m2(1,1));
145 Vec2 nrvo(std::min(v1[0],v2[0]),
146 std::min(v1[1],v2[1]));
152 Vec2 nrvo(std::max(v1[0],v2[0]),
153 std::max(v1[1],v2[1]));
158 DLLEXPORT Vec2
Rotate(
const Vec2& v,
Real ang);