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.
Diff: Classe_1.cpp
- Revision:
- 1:ea27eae94ab2
- Parent:
- 0:6e688c52e0cc
--- a/Classe_1.cpp Mon Apr 04 08:19:48 2016 +0000
+++ b/Classe_1.cpp Thu Apr 15 17:10:47 2021 +0000
@@ -1,30 +1,26 @@
-
#include "Classe_1.h"
Classe_1::Classe_1 (void)
{
- variable_1 = 0 ;
- };
+ point.x = 0.0f ;
+ point.y = 0.0f ;
+ }
void Classe_1::fonction_1(void)
{
- variable_1++;
- //*pOutput = 0 ;
- //*(pAdresses->pOut) = 0 ;
- pOutput->write(0) ;
+ point.x = 0.0f ;
+ point.y = 0.0f ;
}
-int Classe_1::fonction_2(void)
+
+float Classe_1::fonction_2(void)
{
- //*pOutput = 1 ;
- //*(pAdresses->pOut) = 1 ;
- pOutput->write(1) ;
- return (variable_1);
+ float ret = sqrt( pow ( point.x , 2 ) + pow ( point.y , 2 ) ) ;
+ return (ret);
}
- void Classe_1::Set_Out ()
+int Classe_1::fonction_3(Point *pP)
{
- //pOutput = pOut ;
- pOutput = pAdresses->pOut ;
+ point.x += pP->x ;
+ point.y += pP->y ;
+ return (1);
}
- //int variable_1 ;
-