6f40d895e3a7a6c40a1ddbaa591e4b218cb58701
1 #ifndef CALIBREUR_F_CPU_H_
2 #define CALIBREUR_F_CPU_H_
4 #include "IntervalF_CPU.h"
13 /*--------------------------------------*\
15 \*-------------------------------------*/
17 CalibreurF(const IntervalF
& input
, const IntervalF
& output
)
19 this->pente
= (output
.b
- output
.a
) / (float) (input
.b
- input
.a
);
20 this->translation
= output
.a
- pente
* input
.a
;
23 /*--------------------------------------*\
25 \*-------------------------------------*/
29 void calibrer(float& value
)
31 value
= value
* pente
+ translation
;
39 float getTranslation()
41 return this->translation
;
44 /*--------------------------------------*\
46 \*-------------------------------------*/
59 /*----------------------------------------------------------------------*\
61 \*---------------------------------------------------------------------*/