Bugfixes and Improvements:
- suppress documentation warnings
- remove redundant typedef
- fix print functions to align column correctly
New Features:
Print Functions Improvements
-
While printing, mis-alignment of columns are fixed: larger numbers are printed via %g and others are printed via %f Column withs are calculated before print.
-
Now values are colorful ;)
-
New options with default values:
#define CGLM_PRINT_PRECISION 5
#define CGLM_PRINT_MAX_TO_SHORT 1e5
#define CGLM_PRINT_COLOR "\033[36m"
#define CGLM_PRINT_COLOR_RESET "\033[0m"
- Inline prints are only enabled in DEBUG mode and if CGLM_DEFINE_PRINTS is defined.
- You can still call library-print functions e.g. glmc_print...
To make codes unbroken, cglm makes inline print functions to be empty-body (if DEBUG and CGLM_DEFINE_PRINTS are not defined):
CGLM_INLINE void glm_mat4_print(mat4 matrix, FILE *o) { }
compiler must eliminate this empty inline function calls. This also can be disabled by defining CGLM_NO_PRINTS_NOOP
macro. 🎉
Define CGLM_PRINT_PRECISION
to change print precision, default is increased to 5 from 4 ...