vtdata library
Public Member Functions | Public Attributes | List of all members
DPoint2 Class Reference

Public Member Functions

 DPoint2 (int ix, int iy)
 
 DPoint2 (float fx, float fy)
 
 DPoint2 (double fx, double fy)
 
 DPoint2 (const FPoint2 &f)
 
double Length () const
 
double LengthSquared () const
 
DPoint2Normalize ()
 
DPoint2SetLength (double len)
 
void Set (double fx, double fy)
 
double Dot (const DPoint2 &rhs) const
 
void Mult (const DPoint2 &factor)
 
void Mult (const double fx, const double fy)
 
void Div (const DPoint2 &factor)
 
void Div (const double fx, const double fy)
 
void Rotate (double radians)
 
double Cross (const DPoint2 &rhs)
 
DPoint2operator= (const DPoint2 &v)
 
DPoint2operator= (const class FPoint2 &v)
 
DPoint2 operator+ (const DPoint2 &v) const
 
DPoint2 operator- (const DPoint2 &v) const
 
DPoint2 operator* (double s) const
 
DPoint2 operator/ (double s) const
 
DPoint2 operator- () const
 
void operator+= (const DPoint2 &v)
 
void operator-= (const DPoint2 &v)
 
void operator*= (double s)
 
void operator/= (double s)
 
bool operator== (const DPoint2 &v) const
 
bool operator!= (const DPoint2 &v) const
 
DPoint2 operator- (void)
 

Public Attributes

double x
 
double y
 

Detailed Description

A 2-component vector class, double-precision.

Member Function Documentation

double DPoint2::Cross ( const DPoint2 rhs)
inline

The so-called "2D cross product" is really the dot-product with the perpendicular vector