diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-09 18:27:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-09 18:27:51 +0400 |
commit | 15d0d3f41e51a29f79f40600fdd3d856e9c525c4 (patch) | |
tree | 57fb8a72f22650d0dcdc1fb65bd1d99ce42107c1 /source/blender/editors | |
parent | d4ae38cc6c4ec8e3d13f26d12f85bca561f64f0f (diff) |
replace log() calls with constants
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 99b4b68b42d..37e4cc7616b 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1733,7 +1733,7 @@ void ui_set_but_default(bContext *C, short all) static double soft_range_round_up(double value, double max) { /* round up to .., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, .. */ - double newmax= pow(10.0, ceil(log(value)/log(10.0))); + double newmax= pow(10.0, ceil(log(value)/M_LN10)); if(newmax*0.2 >= max && newmax*0.2 >= value) return newmax*0.2; @@ -1746,7 +1746,7 @@ static double soft_range_round_up(double value, double max) static double soft_range_round_down(double value, double max) { /* round down to .., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, .. */ - double newmax= pow(10.0, floor(log(value)/log(10.0))); + double newmax= pow(10.0, floor(log(value)/M_LN10)); if(newmax*5.0 <= max && newmax*5.0 <= value) return newmax*5.0; diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 43e46d485ee..2c1ba148643 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -436,7 +436,7 @@ static void outliner_sort(SpaceOops *soops, ListBase *lb) static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *idv, TreeElement *parent, short type, short index); -#define LOG2I(x) (int)(log(x)/log(2.0)) +#define LOG2I(x) (int)(log(x)/M_LN2) static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, SceneRenderLayer *srl) { |