diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-05 14:39:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-05 14:54:20 +0400 |
commit | 2a82b8ade50836e186a78d3b52362cb8c59f3a39 (patch) | |
tree | 7483753c3ef3c14fe217ff7b529d5f84a191a462 /source/blender/blenlib/BLI_math_base.h | |
parent | 95ac6bc9e5a909fba2a248fcd619cf3ac9bdb7a4 (diff) |
Math Lib: add power of 2 min/max for unsigned ints
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 63a9bac288e..5458def8de1 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -231,6 +231,9 @@ MINLINE int is_power_of_2_i(int n); MINLINE int power_of_2_max_i(int n); MINLINE int power_of_2_min_i(int n); +MINLINE unsigned int power_of_2_max_u(unsigned int x); +MINLINE unsigned int power_of_2_min_u(unsigned int x); + MINLINE int iroundf(float a); MINLINE int divide_round_i(int a, int b); MINLINE int mod_i(int i, int n); |