1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| #ifndef VECT_H
#define VECT_H
class Vect {
public:
explicit Vect(int, int);
explicit Vect();
int x, y;
void operator+=(Vect const& a);
void operator-=(Vect const& a);
int width, height;
};
bool operator==(Vect const& a, Vect const& b);
bool operator!=(Vect const& a, Vect const& b);
Vect operator+(Vect const& a, Vect const& b);
Vect operator-(Vect const& a, Vect const& b);
int coord_gbr(Vect const& a);
int coord_gray(Vect const& a);
bool is_null(Vect const &a);
bool control(Vect const &a);
#endif // VECT_H
#ifndef VECT_F_H
#define VECT_F_H
class Vect_f {
public:
explicit Vect_f(float, float);
explicit Vect_f();
float x, y;
void operator+=(Vect_f const& a);
void operator-=(Vect_f const& a);
float width, height;
};
bool operator==(Vect_f const& a, Vect_f const& b);
bool operator!=(Vect_f const& a, Vect_f const& b);
Vect_f operator+(Vect_f const& a, Vect_f const& b);
Vect_f operator-(Vect_f const& a, Vect_f const& b);
bool is_null_f(Vect_f const &a);
bool control_f(Vect_f const &a);
Vect_f cross(Vect_f const &v1, Vect_f const &w1, Vect_f const &v2, Vect_f const &w2);
#endif // VECT_F_H |
Partager