Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Vec2D Class Reference

#include <vec3d.h>

Public Member Functions

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

Public Attributes

float x
float y

Friends

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

Detailed Description

Definition at line 128 of file vec3d.h.

Constructor & Destructor Documentation

◆ Vec2D() [1/2]

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

◆ Vec2D() [2/2]

Vec2D::Vec2D ( const Vec2D & v)
inline

Definition at line 135 of file vec3d.h.

References Vec2D(), x, and y.

Member Function Documentation

◆ length()

float Vec2D::length ( ) const
inline

Definition at line 197 of file vec3d.h.

References x, and y.

Referenced by normalize().

◆ lengthSquared()

float Vec2D::lengthSquared ( ) const
inline

Definition at line 192 of file vec3d.h.

References x, and y.

◆ normalize()

Vec2D & Vec2D::normalize ( )
inline

Definition at line 202 of file vec3d.h.

References length(), operator*=(), and Vec2D().

Referenced by operator~().

◆ operator float *()

Vec2D::operator float * ( )
inline

Definition at line 222 of file vec3d.h.

◆ operator*() [1/2]

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

Definition at line 155 of file vec3d.h.

References Vec2D(), x, and y.

◆ operator*() [2/2]

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

Definition at line 160 of file vec3d.h.

References Vec2D(), x, and y.

◆ operator*=()

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

Definition at line 185 of file vec3d.h.

References Vec2D(), x, and y.

Referenced by normalize().

◆ operator+()

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

Definition at line 143 of file vec3d.h.

References Vec2D(), x, and y.

◆ operator+=()

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

Definition at line 171 of file vec3d.h.

References Vec2D(), x, and y.

◆ operator-()

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

Definition at line 149 of file vec3d.h.

References Vec2D(), x, and y.

◆ operator-=()

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

Definition at line 178 of file vec3d.h.

References Vec2D(), x, and y.

◆ operator=()

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

Definition at line 137 of file vec3d.h.

References Vec2D(), x, and y.

◆ operator~()

Vec2D Vec2D::operator~ ( ) const
inline

Definition at line 208 of file vec3d.h.

References normalize(), and Vec2D().

◆ operator*

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

Definition at line 166 of file vec3d.h.

References Vec2D().

◆ operator>>

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

Definition at line 216 of file vec3d.h.

References Vec2D(), x, and y.

Member Data Documentation

◆ x

◆ y


The documentation for this class was generated from the following file:
  • src/tools/vmap4_extractor/vec3d.h