Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
481 B

  1. /* RotateDefs.h -- Rotate functions
  2. 2013-11-12 : Igor Pavlov : Public domain */
  3. #ifndef __ROTATE_DEFS_H
  4. #define __ROTATE_DEFS_H
  5. #ifdef _MSC_VER
  6. #include <stdlib.h>
  7. // #if (_MSC_VER >= 1200)
  8. #pragma intrinsic(_rotl)
  9. #pragma intrinsic(_rotr)
  10. // #endif
  11. #define rotlFixed(x, n) _rotl((x), (n))
  12. #define rotrFixed(x, n) _rotr((x), (n))
  13. #else
  14. #define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
  15. #define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
  16. #endif
  17. #endif