Cuboid
Dependencies: mbed
LinearCharacteristics.cpp
- Committer:
- altb
- Date:
- 2018-05-17
- Revision:
- 21:cef093edb441
- Parent:
- 0:15be70d21d7c
File content as of revision 21:cef093edb441:
#include "LinearCharacteristics.h" using namespace std; LinearCharacteristics::LinearCharacteristics(float gain,float offset){ // standard lin characteristics this->gain = gain; 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() {} float LinearCharacteristics::evaluate(float x) { return this->gain*(x - this->offset); }