28 #include <boost/archive/text_oarchive.hpp> 29 #include <boost/archive/text_iarchive.hpp> 35 friend class boost::serialization::access;
36 template<
typename Archive>
49 operator float* () {
return (
float*)(
c);}
82 inline T
area()
const {
return w *
h; }
119 template<
typename T,
typename C>
128 if((op != C(
',') && op != C(
'x') && op != C(
'|')) || is.bad())
130 throw std::runtime_error(
"Not able to convert from stream to vector!");
136 template<
typename T,
typename C>
139 os << v.
x << C(
',') << C(
' ') << v.y;
basic_vector2 operator-() const
basic_vector2 & operator/=(const basic_vector2 &v)
double distance(const basic_vector2 &v) const
bool operator==(const basic_vector2 &v) const
void serialize(Archive &ar, const unsigned int version)
bool isInRange(const basic_vector2 &v, double epsilon=0.000000001) const
basic_vector2(const T _x, const T _y)
basic_vector2 & operator*=(const basic_vector2 &v)
basic_vector2 operator/(const basic_vector2 &v) const
basic_vector2 operator+(const basic_vector2 &v) const
basic_vector2 & operator=(const basic_vector2 &v)=default
basic_vector2< coord_t > FixedPoint
double distanceQuad(const basic_vector2 &v) const
basic_vector2 & operator+=(const basic_vector2 &v)
basic_vector2< double > FloatPoint
basic_vector2(const T _v)
basic_vector2< double > Vector
basic_vector2 operator*(const basic_vector2 &v) const
basic_vector2 & operator-=(const basic_vector2 &v)
bool operator!=(const basic_vector2 &v) const
std::basic_istream< C > & operator>>(std::basic_istream< C > &is, basic_vector2< T > &v)