template<typename F>
class HPS::Vector_2D

Public Functions

inline HPS_INLINE F Cross (Vector_2D const &v) const
inline HPS_INLINE F Dot (Vector_2D const &v) const
inline bool Equals(Vector_2D const &v, int in_tolerance = 32) const
inline HPS_INLINE double Length () const

The length of this vector.

inline HPS_INLINE double LengthSquared () const
inline HPS_INLINE F Magnitude () const

Returns the largest absolute directional vector of all major directions (x or y).


Largest absolute directional vector component.

inline HPS_INLINE F Manhattan () const
inline HPS_INLINE Vector_2D & Normalize (bool check_range=false, F epsilon=Float_Traits< F >::Epsilon())
inline HPS_INLINE Vector_2D & Normalize (F epsilon)
inline HPS_INLINE Vector_2D Normalized (bool check_range=false, F epsilon=Float_Traits< F >::Epsilon()) const
inline HPS_INLINE Vector_2D Normalized (F epsilon) const
inline bool operator!=(Vector_2D const &v) const
inline Vector_2D const operator*(F s) const
inline Vector_2D &operator*=(F s)
inline Vector_2D const operator+(Vector_2D const &v) const
inline Vector_2D &operator+=(Vector_2D const &v)
inline Vector_2D const operator-() const
inline Vector_2D const operator-(Vector_2D const &v) const
inline Vector_2D &operator-=(Vector_2D const &v)
inline Vector_2D const operator/(F s) const
inline Vector_2D &operator/=(F s)
inline bool operator==(Vector_2D const &v) const
inline F &operator[](size_t i)
inline F const &operator[](size_t i) const
inline HPS_INLINE Vector_2D Scale (Vector_2D const &v) const
inline Vector_2D()
inline Vector_2D(F v1, F v2)
explicit Vector_2D(Plane_2D<F> const &p)
inline explicit Vector_2D(Point_2D<F> const &p)
template<typename D>
inline explicit Vector_2D(Vector_2D<D> const &that)
inline explicit Vector_2D(Vector_3D<F> const &that)

Public Members

F x
F y

Public Static Functions

static inline HPS_INLINE Vector_2D Unit ()
static inline HPS_INLINE Vector_2D XAxis ()
static inline HPS_INLINE Vector_2D YAxis ()
static inline HPS_INLINE Vector_2D Zero ()