CRM32Pro SDK  v5.22
List of all members | Public Member Functions
CRM32Pro_DataTypes::sV2D Class Reference

Vector 2D class. More...

Detailed Description

Vector 2D class.

Public Member Functions

double Distance (const sV2D &v2)
 Distance between this vector and the one passed as a parameter. More...
 
double Dot (sV2D &v2)
 Calculates the dot product. More...
 
sV2D GetPerpendicular ()
 Get a perpendicular vector. More...
 
sV2D GetReflect (sV2D &norm)
 
sV2D GetReverse ()
 Get the reverse vector.
 
double Length ()
 Length of the 2D vector. More...
 
void Normalize ()
 Normalizes the 2D Vector.
 
int Sign (sV2D &v2)
 Calculates the sign. More...
 
void Truncate (double max)
 Adjusts x and y so that the length of the vector does not exceed max. More...
 

Member Function Documentation

double CRM32Pro_DataTypes::sV2D::Distance ( const sV2D v2)
inline

Distance between this vector and the one passed as a parameter.

Parameters
v2Vector
Returns
double with the distance between both vectors
double CRM32Pro_DataTypes::sV2D::Dot ( sV2D v2)
inline

Calculates the dot product.

Parameters
v2Vector
Returns
double with the Dot product
sV2D CRM32Pro_DataTypes::sV2D::GetPerpendicular ( )
inline

Get a perpendicular vector.

Returns
sV2D perpendicular to this one
sV2D CRM32Pro_DataTypes::sV2D::GetReflect ( sV2D norm)
inline
Parameters
normnormalized vector (the wall?)
Returns
sV2D with the reflected vector
double CRM32Pro_DataTypes::sV2D::Length ( )
inline

Length of the 2D vector.

Returns
double with the length of the vector
int CRM32Pro_DataTypes::sV2D::Sign ( sV2D v2)
inline

Calculates the sign.

Parameters
v2Vector
Returns
positive integer if v2 is clockwise of us, minus if anticlockwise
void CRM32Pro_DataTypes::sV2D::Truncate ( double  max)
inline

Adjusts x and y so that the length of the vector does not exceed max.

Parameters
maxdouble with the maximum length

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