Changeset 4987

Show
Ignore:
Timestamp:
10/21/07 23:27:07 (1 year ago)
Author:
morris
Message:

Add WIClamp()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredAdditions/trunk/WIMacros.h

    r4833 r4987  
    2727 */ 
    2828 
     29#define WIClamp(x, min, max) \ 
     30        (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x))) 
     31 
    2932#define WIEncode(coder, var) \ 
    3033        [coder encodeValueOfObjCType:@encode(typeof(var)) at:&(var)]