Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Classes/Vector.h@0:8743b606abc3, 2020-02-11 (annotated)
- Committer:
- Wael_H
- Date:
- Tue Feb 11 15:41:45 2020 +0000
- Revision:
- 0:8743b606abc3
- Child:
- 2:1103f5d61035
Version direction a peu pres
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Wael_H | 0:8743b606abc3 | 1 | #ifndef VECTOR_H |
| Wael_H | 0:8743b606abc3 | 2 | #define VECTOR_H |
| Wael_H | 0:8743b606abc3 | 3 | |
| Wael_H | 0:8743b606abc3 | 4 | typedef struct |
| Wael_H | 0:8743b606abc3 | 5 | { |
| Wael_H | 0:8743b606abc3 | 6 | int x; |
| Wael_H | 0:8743b606abc3 | 7 | int y; |
| Wael_H | 0:8743b606abc3 | 8 | }Point; |
| Wael_H | 0:8743b606abc3 | 9 | |
| Wael_H | 0:8743b606abc3 | 10 | class Vector |
| Wael_H | 0:8743b606abc3 | 11 | { |
| Wael_H | 0:8743b606abc3 | 12 | public: |
| Wael_H | 0:8743b606abc3 | 13 | Vector(int x0, int y0, int x1, int y1); |
| Wael_H | 0:8743b606abc3 | 14 | Vector(Point p0, Point p1); |
| Wael_H | 0:8743b606abc3 | 15 | Vector(); |
| Wael_H | 0:8743b606abc3 | 16 | void orienteVersLeHaut(); // fct qui met la pointe du Vector (p1) vers le haut (dans une console (y inversés donc)) |
| Wael_H | 0:8743b606abc3 | 17 | float getCoeffDir() const; |
| Wael_H | 0:8743b606abc3 | 18 | int getNorme() const; |
| Wael_H | 0:8743b606abc3 | 19 | bool estADroiteDe(Vector& v) const; |
| Wael_H | 0:8743b606abc3 | 20 | static Vector getVectorAuMilieuDe(Vector& v0, Vector& v1); |
| Wael_H | 0:8743b606abc3 | 21 | |
| Wael_H | 0:8743b606abc3 | 22 | private: |
| Wael_H | 0:8743b606abc3 | 23 | Point p0, p1; |
| Wael_H | 0:8743b606abc3 | 24 | }; |
| Wael_H | 0:8743b606abc3 | 25 | |
| Wael_H | 0:8743b606abc3 | 26 | #endif // VECTOR_H |