minmax.h 441 B

123456789101112131415161718192021
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_MINMAX
  7. #define _INC_MINMAX
  8. #ifndef __cplusplus
  9. #ifndef NOMINMAX
  10. #ifndef max
  11. #define max(a,b) (((a) > (b)) ? (a) : (b))
  12. #endif
  13. #ifndef min
  14. #define min(a,b) (((a) < (b)) ? (a) : (b))
  15. #endif
  16. #endif
  17. #endif
  18. #endif