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.
Dependents: jrh52_a3 TBI_FIAT_FEEDFORWARD Ignition accuBlast_display ... more
reScale.cpp
00001 #include "reScale.h" 00002 00003 reScale::reScale(long in_min, long in_max, long out_min, long out_max) : 00004 _inMin (in_min),_inMax(in_max),_outMin (out_min),_outMax (out_max) 00005 { 00006 00007 } 00008 00009 long reScale::from(long value) 00010 { 00011 return (value - _inMin) * (_outMax - _outMin) / (_inMax - _inMin) + _outMin; 00012 }
Generated on Wed Jul 13 2022 08:48:27 by
1.7.2