Empirical
Public Member Functions | List of all members
emp::Point2D< TYPE > Class Template Reference

#include <Point2D.h>

Public Member Functions

constexpr Point2D ()
 
constexpr Point2D (const Point2D &_in)
 
constexpr Point2D (TYPE _x, TYPE _y)
 
constexpr Point2D (const Point2D &_in, TYPE new_magnitude)
 
const Point2Doperator= (const Point2D &_in)
 
constexpr bool operator== (const Point2D &_in) const
 
constexpr bool operator!= (const Point2D &_in) const
 
constexpr TYPE GetX () const
 
constexpr TYPE GetY () const
 
Point2DSetX (TYPE in_x)
 
Point2DSetY (TYPE in_y)
 
Point2DSet (TYPE _x, TYPE _y)
 
constexpr double SquareMagnitude () const
 
constexpr double Magnitude () const
 
constexpr bool AtOrigin () const
 
constexpr bool NonZero () const
 
constexpr Point2D GetMidpoint (const Point2D &p2) const
 
constexpr Point2D GetRot90 () const
 
constexpr Point2D GetRot180 () const
 
constexpr Point2D GetRot270 () const
 
constexpr Point2D GetOffset (TYPE off_x, TYPE off_y) const
 
constexpr Point2D operator+ (const Point2D &_in) const
 
constexpr Point2D operator- (const Point2D &_in) const
 
constexpr Point2D operator* (double mult) const
 
constexpr Point2D operator/ (double div) const
 
constexpr Point2D operator* (int mult) const
 
constexpr Point2D operator/ (int div) const
 
constexpr Point2D operator- () const
 
constexpr Point2D Abs () const
 
Point2DTranslate (TYPE shift_x, TYPE shift_y)
 
Point2DTranslateX (TYPE shift)
 
Point2DTranslateY (TYPE shift)
 
Point2DScale (double scale)
 
Point2DScale (double scale_x, double scale_y)
 
Point2DToOrigin ()
 
Point2DNegateX ()
 
Point2DNegateY ()
 
Point2Doperator+= (const Point2D &_in)
 
Point2Doperator-= (const Point2D &_in)
 
Point2Doperator*= (double mult)
 
Point2Doperator/= (double val)
 
Point2Doperator*= (int mult)
 
Point2Doperator/= (int val)
 
Point2DRot90 ()
 
Point2DRot180 ()
 
Point2DRot270 ()
 
TYPE SquareDistance (const Point2D &_in) const
 
TYPE Distance (const Point2D &_in) const
 

Constructor & Destructor Documentation

template<typename TYPE = double>
constexpr emp::Point2D< TYPE >::Point2D ( )
inline
template<typename TYPE = double>
constexpr emp::Point2D< TYPE >::Point2D ( const Point2D< TYPE > &  _in)
inline
template<typename TYPE = double>
constexpr emp::Point2D< TYPE >::Point2D ( TYPE  _x,
TYPE  _y 
)
inline
template<typename TYPE = double>
constexpr emp::Point2D< TYPE >::Point2D ( const Point2D< TYPE > &  _in,
TYPE  new_magnitude 
)
inline

Member Function Documentation

template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::Abs ( ) const
inline
template<typename TYPE = double>
constexpr bool emp::Point2D< TYPE >::AtOrigin ( ) const
inline
template<typename TYPE = double>
TYPE emp::Point2D< TYPE >::Distance ( const Point2D< TYPE > &  _in) const
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::GetMidpoint ( const Point2D< TYPE > &  p2) const
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::GetOffset ( TYPE  off_x,
TYPE  off_y 
) const
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::GetRot180 ( ) const
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::GetRot270 ( ) const
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::GetRot90 ( ) const
inline
template<typename TYPE = double>
constexpr TYPE emp::Point2D< TYPE >::GetX ( ) const
inline
template<typename TYPE = double>
constexpr TYPE emp::Point2D< TYPE >::GetY ( ) const
inline
template<typename TYPE = double>
constexpr double emp::Point2D< TYPE >::Magnitude ( ) const
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::NegateX ( )
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::NegateY ( )
inline
template<typename TYPE = double>
constexpr bool emp::Point2D< TYPE >::NonZero ( ) const
inline
template<typename TYPE = double>
constexpr bool emp::Point2D< TYPE >::operator!= ( const Point2D< TYPE > &  _in) const
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::operator* ( double  mult) const
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::operator* ( int  mult) const
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::operator*= ( double  mult)
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::operator*= ( int  mult)
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::operator+ ( const Point2D< TYPE > &  _in) const
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::operator+= ( const Point2D< TYPE > &  _in)
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::operator- ( const Point2D< TYPE > &  _in) const
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::operator- ( ) const
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::operator-= ( const Point2D< TYPE > &  _in)
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::operator/ ( double  div) const
inline
template<typename TYPE = double>
constexpr Point2D emp::Point2D< TYPE >::operator/ ( int  div) const
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::operator/= ( double  val)
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::operator/= ( int  val)
inline
template<typename TYPE = double>
const Point2D& emp::Point2D< TYPE >::operator= ( const Point2D< TYPE > &  _in)
inline
template<typename TYPE = double>
constexpr bool emp::Point2D< TYPE >::operator== ( const Point2D< TYPE > &  _in) const
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::Rot180 ( )
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::Rot270 ( )
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::Rot90 ( )
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::Scale ( double  scale)
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::Scale ( double  scale_x,
double  scale_y 
)
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::Set ( TYPE  _x,
TYPE  _y 
)
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::SetX ( TYPE  in_x)
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::SetY ( TYPE  in_y)
inline
template<typename TYPE = double>
TYPE emp::Point2D< TYPE >::SquareDistance ( const Point2D< TYPE > &  _in) const
inline
template<typename TYPE = double>
constexpr double emp::Point2D< TYPE >::SquareMagnitude ( ) const
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::ToOrigin ( )
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::Translate ( TYPE  shift_x,
TYPE  shift_y 
)
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::TranslateX ( TYPE  shift)
inline
template<typename TYPE = double>
Point2D& emp::Point2D< TYPE >::TranslateY ( TYPE  shift)
inline

The documentation for this class was generated from the following file: