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.
Dependencies: mbed
LinearCharacteristics.cpp
00001 #include "LinearCharacteristics.h" 00002 00003 using namespace std; 00004 00005 LinearCharacteristics::LinearCharacteristics(float k, float offset, float min, float max) // standard lin characteristics 00006 { 00007 this -> k = k; 00008 this -> offset = offset; 00009 this -> min = min; 00010 this -> max = max; 00011 // ... 00012 } 00013 00014 LinearCharacteristics::~LinearCharacteristics(){} 00015 00016 float LinearCharacteristics::trans(float input) 00017 { 00018 00019 output = k*input + offset; 00020 00021 if(output >= max) { 00022 output = max; 00023 } 00024 if(output <= min) { 00025 output = min; 00026 } 00027 return output; 00028 } 00029
Generated on Mon Jul 18 2022 18:17:56 by
1.7.2