75 inline void rotate(
double rotationAngle);
112 str <<
"[ x= " << vec.
x() <<
" y= " << vec.
y() <<
" ]";
Class representing a 2D vector with double precision.
Definition vector2DD.h:20
void setY(double y)
Sets the y coordinate.
double x() const
Gets the x coordinate.
DtVector2DD & operator/=(double scalar)
Division assignment operator.
DtVector2DD(const DtVector2DD &orig)
Copy constructor.
double myY
The y coordinate.
Definition vector2DD.h:100
double length() const
Calculates the length/magnitude of the vector.
double myX
The x coordinate.
Definition vector2DD.h:97
const DtVector2DD & operator=(const DtVector2DD &orig)
Assignment operator.
void normalize()
Normalizes the vector.
double lengthSquared() const
Calculates the squared length/magnitude of the vector.
DtVector2DD(double x, double y)
Constructor with x and y coordinates.
double y() const
Gets the y coordinate.
DtVector2DD()
Default constructor.
void rotate(double rotationAngle)
Rotates the vector counter-clockwise.
void setX(double x)
Sets the x coordinate.
Defines export macros for the VREngage Utility library.
#define UTIL_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
std::ostream & operator<<(std::ostream &str, const makVre::DtVector2DD &vec)
Stream insertion operator for DtVector2DD.
Definition vector2DD.h:110