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.
Utils.h
00001 #ifndef _UTILS_H_ 00002 #define _UTILS_H_ 00003 00004 #include "mbed.h" 00005 00006 float max(float a, float b){ 00007 if(a>b) return a; 00008 else return b; 00009 } 00010 00011 float min(float a, float b){ 00012 if(a<b) return a; 00013 else return b; 00014 } 00015 00016 float clip(float m, float M, float a){ 00017 return max(min(M,a),m); 00018 } 00019 00020 /*float abs(float a){ 00021 return max(a,-a); 00022 }*/ 00023 00024 #endif
Generated on Wed Jul 13 2022 00:49:05 by
1.7.2