TrinityCore
Vec2D Class Reference

#include <vec3d.h>

Public Member Functions

 Vec2D (float x0=0.0f, float y0=0.0f)
 
 Vec2D (Vec2D const &v)=default
 
Vec2Doperator= (Vec2D const &v)=default
 
Vec2D operator+ (Vec2D const &v) const
 
Vec2D operator- (Vec2D const &v) const
 
float operator* (Vec2D const &v) const
 
Vec2D operator* (float d) const
 
Vec2Doperator+= (Vec2D const &v)
 
Vec2Doperator-= (Vec2D const &v)
 
Vec2Doperator*= (float d)
 
float lengthSquared () const
 
float length () const
 
Vec2Dnormalize ()
 
Vec2D operator~ () const
 
 operator float * ()
 

Public Attributes

float x
 
float y
 

Friends

Vec2D operator* (float d, Vec2D const &v)
 
std::istream & operator>> (std::istream &in, Vec2D &v)
 

Detailed Description

Definition at line 148 of file vec3d.h.

Constructor & Destructor Documentation

◆ Vec2D() [1/2]

Vec2D::Vec2D ( float  x0 = 0.0f,
float  y0 = 0.0f 
)
inline

Definition at line 153 of file vec3d.h.

◆ Vec2D() [2/2]

Vec2D::Vec2D ( Vec2D const &  v)
default

Member Function Documentation

◆ length()

float Vec2D::length ( ) const
inline

Definition at line 213 of file vec3d.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lengthSquared()

float Vec2D::lengthSquared ( ) const
inline

Definition at line 208 of file vec3d.h.

+ Here is the caller graph for this function:

◆ normalize()

Vec2D & Vec2D::normalize ( )
inline

Definition at line 218 of file vec3d.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator float *()

Vec2D::operator float * ( )
inline

Definition at line 237 of file vec3d.h.

◆ operator*() [1/2]

Vec2D Vec2D::operator* ( float  d) const
inline

Definition at line 176 of file vec3d.h.

◆ operator*() [2/2]

float Vec2D::operator* ( Vec2D const &  v) const
inline

Definition at line 171 of file vec3d.h.

◆ operator*=()

Vec2D & Vec2D::operator*= ( float  d)
inline

Definition at line 201 of file vec3d.h.

◆ operator+()

Vec2D Vec2D::operator+ ( Vec2D const &  v) const
inline

Definition at line 159 of file vec3d.h.

◆ operator+=()

Vec2D & Vec2D::operator+= ( Vec2D const &  v)
inline

Definition at line 187 of file vec3d.h.

◆ operator-()

Vec2D Vec2D::operator- ( Vec2D const &  v) const
inline

Definition at line 165 of file vec3d.h.

◆ operator-=()

Vec2D & Vec2D::operator-= ( Vec2D const &  v)
inline

Definition at line 194 of file vec3d.h.

◆ operator=()

Vec2D & Vec2D::operator= ( Vec2D const &  v)
default

◆ operator~()

Vec2D Vec2D::operator~ ( ) const
inline

Definition at line 224 of file vec3d.h.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator*

Vec2D operator* ( float  d,
Vec2D const &  v 
)
friend

Definition at line 182 of file vec3d.h.

◆ operator>>

std::istream & operator>> ( std::istream &  in,
Vec2D v 
)
friend

Definition at line 231 of file vec3d.h.

Member Data Documentation

◆ x

float Vec2D::x

Definition at line 151 of file vec3d.h.

◆ y

float Vec2D::y

Definition at line 151 of file vec3d.h.


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