diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-10 23:43:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-10 23:43:45 +0300 |
commit | 37e4a311b0ad9da7177e50620efc3561e2dd7045 (patch) | |
tree | 8aea2cc851ab828ee040d601ed4c776283fd639a /source/blender/blenkernel/intern/brush.c | |
parent | 4617bb68ba4b1c5ab459673fffd98bf7203bb4f2 (diff) |
Math Lib
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
conversion script instead, if they use a lot of math functions
in new code:
http://www.pasteall.org/9052/python
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 115d31b587c..ccee5a266f2 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -42,7 +42,7 @@ #include "RNA_access.h" -#include "BLI_arithb.h" +#include "BLI_math.h" #include "BLI_blenlib.h" #include "BLI_rand.h" @@ -845,8 +845,8 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl /* setup starting time, direction vector and accumulated time */ starttime= painter->accumtime; - Vec2Subf(dmousepos, pos, painter->lastmousepos); - len= Normalize2(dmousepos); + sub_v2_v2v2(dmousepos, pos, painter->lastmousepos); + len= normalize_v2(dmousepos); painter->accumtime += curtime - painter->lasttime; /* do paint op over unpainted time distance */ @@ -880,8 +880,8 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl /* setup starting distance, direction vector and accumulated distance */ startdistance= painter->accumdistance; - Vec2Subf(dmousepos, pos, painter->lastmousepos); - len= Normalize2(dmousepos); + sub_v2_v2v2(dmousepos, pos, painter->lastmousepos); + len= normalize_v2(dmousepos); painter->accumdistance += len; /* do paint op over unpainted distance */ |