sm64

A Super Mario 64 decompilation
Log | Files | Refs | README | LICENSE

gd_macros.h (420B)


      1 #ifndef GD_MACROS_H
      2 #define GD_MACROS_H
      3 
      4 /**
      5  * @file gd_macros.h
      6  *
      7  * Common macros that Goddard used throughout the Mario Head subsytem code.
      8  */
      9 
     10 #define DEG_PER_RAD 57.29577950560105
     11 #define RAD_PER_DEG (1.0 / DEG_PER_RAD)
     12 
     13 #define ABS(val) (((val) < 0 ? (-(val)) : (val)))
     14 #define SQ(val) ((val) * (val))
     15 #define ALIGN(VAL_, ALIGNMENT_) (((VAL_) + ((ALIGNMENT_) - 1)) & ~((ALIGNMENT_) - 1))
     16 
     17 #endif // GD_MACROS_H