diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-01 17:34:02 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-01 17:34:02 +0300 |
commit | c1e177ad29249a9508ee4f1c7b09f51fba9ac9e9 (patch) | |
tree | e810e5e6a0bd041cef2d15759267afa50958802a /source/blender/blenlib/BLI_math_base.h | |
parent | 702e9c556fcab7bf1f9dc9738f0b580f2963396a (diff) |
BLI_math: add simple helper to get amount of 'integer' digits in a float number.
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_base.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index 0126e30d900..c44b666faea 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -138,6 +138,9 @@ MINLINE int signum_i(float a); MINLINE float power_of_2(float f); +MINLINE int integer_digits_f(const float f); +MINLINE int integer_digits_d(const double d); + /* these don't really fit anywhere but were being copied about a lot */ MINLINE int is_power_of_2_i(int n); MINLINE int power_of_2_max_i(int n); |