Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-07-16 12:05:13 +0300
committerJacques Lucke <jacques@blender.org>2020-07-16 12:05:30 +0300
commitf6f93b5b126d320a223977a07e3e0510ba684ceb (patch)
tree5dc36cc11ae21a320612392bc6a1c42c49fa0d7f /source/blender/blenlib/BLI_math_base.h
parent7e0bf7a0f10bc86fa50ddc852a949890efc11fe2 (diff)
BLI: add safe_divide, safe_modf and safe_logf
Those are defined exactly as their corresponding functions in Cycles.
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r--source/blender/blenlib/BLI_math_base.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 49aa9f3b465..93cd902c27f 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -218,6 +218,10 @@ MINLINE unsigned short round_db_to_ushort_clamp(double a);
MINLINE int round_db_to_int_clamp(double a);
MINLINE unsigned int round_db_to_uint_clamp(double a);
+MINLINE float safe_divide(float a, float b);
+MINLINE float safe_modf(float a, float b);
+MINLINE float safe_logf(float a, float base);
+
int pow_i(int base, int exp);
double double_round(double x, int ndigits);