diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2016-01-20 19:31:52 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2016-01-20 19:31:52 -0200 |
commit | 09cf369f2b5faba0b7aa20274aaa1fee7c075674 (patch) | |
tree | 7cb08e282337b483de387b68cf7e225eb359853f /Meter.h | |
parent | 195f5edbc8dd79267fa23feb5fda2a8be812abeb (diff) | |
parent | 6dae8108f8e6a8d3f4ccf3d92f8bb19d3933861a (diff) |
Merge pull request #349 from Explorer09/clamp-macro
Introduce CLAMP macro. Unify all MAX(l,MIN(h,x)) uses.
Diffstat (limited to 'Meter.h')
-rw-r--r-- | Meter.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -100,6 +100,9 @@ typedef struct GraphData_ { #ifndef MAX #define MAX(a,b) ((a)>(b)?(a):(b)) #endif +#ifndef CLAMP +#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x))) +#endif extern MeterClass Meter_class; |