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: Heiko Simran_Servo_2410 HYDRO-pH-BASIC NucleoBoard_1 ... more
Map.hpp
00001 #ifndef MAP_H 00002 #define MAP_H 00003 00004 #include "mbed.h" 00005 00006 /** 00007 * A library that maps one range (inMin -> inMax) to another (outMin -> outMax) 00008 * 00009 * @author CA Bezuidenhout 00010 */ 00011 class Map 00012 { 00013 public: 00014 /** 00015 * @param inMin : Minimum value of input range 00016 * @param inMax : Maximum value of input range 00017 * @param outMin : Minimum value of output range 00018 * @param outMax : Maximum value of output range 00019 */ 00020 Map (float inMin, float inMax, float outMin, float outMax); 00021 00022 /** 00023 * Map inVal onto the output range 00024 * 00025 * @param inVal : A value in the input range to be mapped onto the output range 00026 * @returns A value in the output range 00027 */ 00028 float Calculate(float inVal); 00029 private: 00030 float _inMin,_inMax; 00031 float _outMin,_outMax; 00032 00033 }; 00034 #endif
Generated on Tue Jul 12 2022 19:35:19 by
1.7.2