From cbed29820b3aec257528ac5e1ec83bc3c96ec058 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Thu, 30 Apr 2020 23:49:38 +0300 Subject: [PATCH] ios: update docs for prints --- docs/source/io.rst | 17 +++++++++++++++++ docs/source/opt.rst | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/docs/source/io.rst b/docs/source/io.rst index 34fe696..cead0be 100644 --- a/docs/source/io.rst +++ b/docs/source/io.rst @@ -28,6 +28,23 @@ Example to print mat4 matrix: (you probably will in some cases), you can change it temporary. cglm may provide precision parameter in the future +Changes since **v0.7.3**: +* Now 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 ;) +* Some print improvements +* New options with default values: + +.. code-block:: c + + #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. + +Check options page. + Table of contents (click to go): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/source/opt.rst b/docs/source/opt.rst index 6deca67..94b9a0c 100644 --- a/docs/source/opt.rst +++ b/docs/source/opt.rst @@ -50,3 +50,24 @@ You have to extra options for dot product: **CGLM_SSE4_DOT** and **CGLM_SSE3_DOT - If **SSE3** is enabled then you can define **CGLM_SSE3_DOT** to force cglm to use **_mm_hadd_ps** instructions. otherwise cglm will use custom cglm's hadd functions which are optimized too. + +Print Options +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. **CGLM_DEFINE_PRINTS** +2. **CGLM_NO_PRINTS_NOOP** + +Inline prints are only enabled in DEBUG mode and if **CGLM_DEFINE_PRINTS** is defined. +If DEBUG is not enabled then print function bodies will be emptied to eliminate print function calls. +You can disable this feature too by defining **CGLM_NO_PRINTS_NOOP** macro top of cglm headers. + +3. **CGLM_PRINT_PRECISION** 5 + +precision. + +4. **CGLM_PRINT_MAX_TO_SHORT** 1e5 + +if a number is greater than this value then %g will be used, since this is shorten print you won't be able to see high precision. + +5. **CGLM_PRINT_COLOR** "\033[36m" +6. **CGLM_PRINT_COLOR_RESET** "\033[0m"