mirror of
https://github.com/ScrelliCopter/VGM-Tools
synced 2025-02-21 04:09:25 +11:00
17 lines
446 B
C
17 lines
446 B
C
#ifndef COMMON_UTIL_H
|
|
#define COMMON_UTIL_H
|
|
|
|
#define MIN(A, B) (((A) < (B)) ? (A) : (B))
|
|
#define MAX(A, B) (((A) > (B)) ? (A) : (B))
|
|
#define CLAMP(X, A, B) (MIN(MAX((X), (A)), (B)))
|
|
|
|
#if ( defined( __GNUC__ ) && ( __GNUC__ >= 4 ) ) || defined( __clang__ )
|
|
#define FORCE_INLINE inline __attribute__((always_inline))
|
|
#elif defined( _MSC_VER )
|
|
#define FORCE_INLINE __forceinline
|
|
#else
|
|
#define FORCE_INLINE inline
|
|
#endif
|
|
|
|
#endif//COMMON_UTIL_H
|