gKit2 light
Loading...
Searching...
No Matches

vecteur generique, utilitaire. More...

#include <vec.h>

Public Member Functions

 vec2 ()
 constructeur par defaut.
 vec2 (const float _x, const float _y)
 vec2 (const vec3 &v)
 vec2 (const vec4 &v)
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 151 of file vec.h.

Constructor & Destructor Documentation

◆ vec2() [1/2]

vec2::vec2 ( )
inline

constructeur par defaut.

Definition at line 154 of file vec.h.

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

◆ vec2() [2/2]

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

Definition at line 155 of file vec.h.

155: 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 160 of file vec.h.

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

◆ operator()() [2/2]

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

Definition at line 161 of file vec.h.

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

Member Data Documentation

◆ x

float vec2::x

Definition at line 163 of file vec.h.

◆ y

float vec2::y

Definition at line 163 of file vec.h.


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