Template for group 4
Fork of RT2_P3_students by
Diff: LinearCharacteristics.cpp
- Revision:
- 7:01a7363583b2
- Parent:
- 5:72982ede2ff6
- Child:
- 10:85840c065e00
diff -r 8ed679044a72 -r 01a7363583b2 LinearCharacteristics.cpp --- a/LinearCharacteristics.cpp Tue Apr 17 11:47:35 2018 +0000 +++ b/LinearCharacteristics.cpp Sun Apr 22 19:54:59 2018 +0000 @@ -7,6 +7,11 @@ this->offset = offset; } +LinearCharacteristics::LinearCharacteristics(float xmin,float xmax, float ymin, float ymax){ // standard lin characteristics + this->gain = (ymax - ymin)/(xmax - xmin); + this->offset = xmax - ymax/this->gain; +} + LinearCharacteristics::~LinearCharacteristics() {}