“Min()”的版本间的差异
(创建页面,内容为“<pre style="color:green"> #define min(a, b) ((a)<(b)?(a):(b)) </pre> 取最小值<br> 取两者之间最小值. 例如:<br> <pre style="color:green"> sensVal = min(...”) |
(没有差异)
|
2016年5月25日 (三) 01:24的最新版本
#define min(a, b) ((a)<(b)?(a):(b))
取最小值
取两者之间最小值. 例如:
sensVal = min(sensVal, 100); // assigns sensVal to the smaller of sensVal or 100 // ensuring that it never gets above 100.