diff options
author | Jacques Lucke <mail@jlucke.com> | 2019-11-26 12:40:54 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-11-26 12:40:54 +0300 |
commit | abe3c18cf620c77f0fe1efb713328036033567cd (patch) | |
tree | c723b93a9a178334f39a245d323d11e07ce0cb52 /source/blender/blenlib/intern/math_base_inline.c | |
parent | 0e1a4f39ac2adad36f69898cdb12d0c90aab7bd5 (diff) | |
parent | 1fbca076341919826bf70f7f1a11752223c75c85 (diff) |
Merge branch 'master' into functions
Diffstat (limited to 'source/blender/blenlib/intern/math_base_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_base_inline.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 66ce8a447fc..e1341da5563 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -532,15 +532,19 @@ MINLINE int signum_i(float a) } } -/** Returns number of (base ten) *significant* digits of integer part of given float - * (negative in case of decimal-only floats, 0.01 returns -1 e.g.). */ +/** + * Returns number of (base ten) *significant* digits of integer part of given float + * (negative in case of decimal-only floats, 0.01 returns -1 e.g.). + */ MINLINE int integer_digits_f(const float f) { return (f == 0.0f) ? 0 : (int)floor(log10(fabs(f))) + 1; } -/** Returns number of (base ten) *significant* digits of integer part of given double - * (negative in case of decimal-only floats, 0.01 returns -1 e.g.). */ +/** + * Returns number of (base ten) *significant* digits of integer part of given double + * (negative in case of decimal-only floats, 0.01 returns -1 e.g.). + */ MINLINE int integer_digits_d(const double d) { return (d == 0.0) ? 0 : (int)floor(log10(fabs(d))) + 1; |