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.
Classe_1.cpp@1:ea27eae94ab2, 2021-04-15 (annotated)
- Committer:
- softris
- Date:
- Thu Apr 15 17:10:47 2021 +0000
- Revision:
- 1:ea27eae94ab2
- Parent:
- 0:6e688c52e0cc
Version de base
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| softris | 0:6e688c52e0cc | 1 | #include "Classe_1.h" | 
| softris | 0:6e688c52e0cc | 2 | |
| softris | 0:6e688c52e0cc | 3 | Classe_1::Classe_1 (void) | 
| softris | 0:6e688c52e0cc | 4 | { | 
| softris | 1:ea27eae94ab2 | 5 | point.x = 0.0f ; | 
| softris | 1:ea27eae94ab2 | 6 | point.y = 0.0f ; | 
| softris | 1:ea27eae94ab2 | 7 | } | 
| softris | 0:6e688c52e0cc | 8 | |
| softris | 0:6e688c52e0cc | 9 | void Classe_1::fonction_1(void) | 
| softris | 0:6e688c52e0cc | 10 | { | 
| softris | 1:ea27eae94ab2 | 11 | point.x = 0.0f ; | 
| softris | 1:ea27eae94ab2 | 12 | point.y = 0.0f ; | 
| softris | 0:6e688c52e0cc | 13 | } | 
| softris | 1:ea27eae94ab2 | 14 | |
| softris | 1:ea27eae94ab2 | 15 | float Classe_1::fonction_2(void) | 
| softris | 0:6e688c52e0cc | 16 | { | 
| softris | 1:ea27eae94ab2 | 17 | float ret = sqrt( pow ( point.x , 2 ) + pow ( point.y , 2 ) ) ; | 
| softris | 1:ea27eae94ab2 | 18 | return (ret); | 
| softris | 0:6e688c52e0cc | 19 | } | 
| softris | 0:6e688c52e0cc | 20 | |
| softris | 1:ea27eae94ab2 | 21 | int Classe_1::fonction_3(Point *pP) | 
| softris | 0:6e688c52e0cc | 22 | { | 
| softris | 1:ea27eae94ab2 | 23 | point.x += pP->x ; | 
| softris | 1:ea27eae94ab2 | 24 | point.y += pP->y ; | 
| softris | 1:ea27eae94ab2 | 25 | return (1); | 
| softris | 0:6e688c52e0cc | 26 | } |