long to float variables
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; }