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.
Fork of reScale by
reScale.cpp
- Committer:
- Marcelocostanzo
- Date:
- 2018-05-16
- Revision:
- 2:1715e312322b
- Parent:
- 1:ebb951147122
File content as of revision 2:1715e312322b:
#include "reScale.h"
reScale::reScale(float in_min, float in_max, float out_min, float out_max) : 
                _inMin (in_min),_inMax(in_max),_outMin (out_min),_outMax (out_max)
{
    
}
float reScale::from(float value)
{
     return (value - _inMin) * (_outMax - _outMin) / (_inMax - _inMin) + _outMin;
}    
            
    