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.
Dependencies: QEI accelerator bit_test cyclic_io cyclic_var cylinder event_var limit mbed mecanum motor_drive pid pid_encoder rs422_put sbdbt servo
Fork of 17robo_fuzi by
limit_.h
00001 /* 00002 dataのmax,minの範囲内の数値を返す関数 00003 00004 limiti([int]data, [int]max, [int]min); //int用 00005 limitf([float]data, [float]max, [float]min); //float用 00006 00007 */ 00008 int limiti(int data, int max, int min){ 00009 if (data > max) { 00010 return max; 00011 } else if (data < min) { 00012 return min; 00013 } 00014 return data; 00015 } 00016 00017 float limitf(float data, float max, float min){ 00018 if (data > max) { 00019 return max; 00020 } else if (data < min) { 00021 return min; 00022 } 00023 return data; 00024 }
Generated on Mon Aug 8 2022 20:27:09 by
