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
Fork of RT2_P3_students_G4 by
LinearCharacteristics.cpp@5:72982ede2ff6, 2018-04-17 (annotated)
- Committer:
- altb
- Date:
- Tue Apr 17 09:06:47 2018 +0000
- Revision:
- 5:72982ede2ff6
- Parent:
- 4:2cc56521aa16
- Child:
- 7:01a7363583b2
.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| altb | 0:78ca29b4c49e | 1 | #include "LinearCharacteristics.h" |
| altb | 0:78ca29b4c49e | 2 | |
| altb | 0:78ca29b4c49e | 3 | using namespace std; |
| altb | 0:78ca29b4c49e | 4 | |
| altb | 5:72982ede2ff6 | 5 | LinearCharacteristics::LinearCharacteristics(float gain,float offset){ // standard lin characteristics |
| altb | 5:72982ede2ff6 | 6 | this->gain = gain; |
| altb | 5:72982ede2ff6 | 7 | this->offset = offset; |
| altb | 2:769ce5f06d3e | 8 | } |
| altb | 2:769ce5f06d3e | 9 | |
| altb | 2:769ce5f06d3e | 10 | LinearCharacteristics::~LinearCharacteristics() {} |
| altb | 2:769ce5f06d3e | 11 | |
| altb | 5:72982ede2ff6 | 12 | |
| altb | 5:72982ede2ff6 | 13 | float LinearCharacteristics::evaluate(float x) |
| altb | 5:72982ede2ff6 | 14 | { |
| altb | 5:72982ede2ff6 | 15 | return this->gain*(x - this->offset); |
| altb | 5:72982ede2ff6 | 16 | } |
