gKit3
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members

vecteur generique, utilitaire. More...

#include <vec.h>

Public Member Functions

 vec2 ()
 constructeur par defaut.
 
 vec2 (const float _x, const float _y)
 
float operator() (const unsigned int i) const
 renvoie la ieme composante du vecteur.
 
float & operator() (const unsigned int i)
 

Public Attributes

float x
 
float y
 

Detailed Description

vecteur generique, utilitaire.

Definition at line 133 of file vec.h.

Constructor & Destructor Documentation

◆ vec2() [1/2]

vec2::vec2 ( )
inline

constructeur par defaut.

Definition at line 136 of file vec.h.

136: x(0), y(0) {}

◆ vec2() [2/2]

vec2::vec2 ( const float  _x,
const float  _y 
)
inline

Definition at line 137 of file vec.h.

137: x(_x), y(_y) {}

Member Function Documentation

◆ operator()() [1/2]

float vec2::operator() ( const unsigned int  i) const
inline

renvoie la ieme composante du vecteur.

Definition at line 140 of file vec.h.

140{ return (&x)[i]; }

◆ operator()() [2/2]

float & vec2::operator() ( const unsigned int  i)
inline

Definition at line 141 of file vec.h.

141{ return (&x)[i]; }

Member Data Documentation

◆ x

float vec2::x

Definition at line 143 of file vec.h.

◆ y

float vec2::y

Definition at line 143 of file vec.h.


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