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

Public Member Functions

 FPoint2 (int ix, int iy)
 
 FPoint2 (float fx, float fy)
 
 FPoint2 (double dx, double dy)
 
 FPoint2 (const DPoint2 &d)
 
float Length () const
 
float LengthSquared () const
 
FPoint2Normalize ()
 
FPoint2SetLength (float len)
 
void Set (float fx, float fy)
 
float Dot (const FPoint2 &rhs) const
 
void Mult (const FPoint2 &factor)
 
void Mult (const float fx, const float fy)
 
void Div (const FPoint2 &factor)
 
void Div (const float fx, const float fy)
 
void Rotate (double radians)
 
float Cross (const FPoint2 &rhs)
 
FPoint2operator= (const FPoint2 &v)
 
FPoint2operator= (const class DPoint2 &v)
 
FPoint2 operator+ (const FPoint2 &v) const
 
FPoint2 operator- (const FPoint2 &v) const
 
FPoint2 operator* (float s) const
 
FPoint2 operator/ (float s) const
 
void operator+= (const FPoint2 &v)
 
void operator-= (const FPoint2 &v)
 
void operator*= (float s)
 
void operator/= (float s)
 
bool operator== (const FPoint2 &v) const
 
bool operator!= (const FPoint2 &v) const
 

Public Attributes

float x
 
float y
 

Detailed Description

A 2-component vector class, single-precision (float).

Member Function Documentation

float FPoint2::Cross ( const FPoint2 rhs)
inline

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