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:
authorCampbell Barton <ideasman42@gmail.com>2009-11-12 15:48:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-12 15:48:39 +0300
commit4f47f21d446cc6b927939507b00e1299c3ce6b01 (patch)
tree38ad128171d533c0fd977f43f50f1ded172309cd /source/blender
parent9596b369bd32e9d5553d467cf61495fade1d6031 (diff)
small corrections, no functionality change
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/intern/boxpack2d.c10
-rw-r--r--source/blender/blenlib/intern/math_geom.c2
-rw-r--r--source/blender/makesrna/intern/rna_screen.c4
-rw-r--r--source/blender/python/generic/Geometry.c14
4 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenlib/intern/boxpack2d.c b/source/blender/blenlib/intern/boxpack2d.c
index 7d5e1eec53e..d31bc4e762d 100644
--- a/source/blender/blenlib/intern/boxpack2d.c
+++ b/source/blender/blenlib/intern/boxpack2d.c
@@ -31,7 +31,7 @@
* The defined Below are for internal use only */
/* free vert flags */
-#define eul 0.0000001f
+#define eps 0.0000001f
#define BLF 1
#define TRF 2
#define TLF 4
@@ -68,10 +68,10 @@
b->v[TR]->y = f;\
UPDATE_V34Y(b)
#define BOXINTERSECT(b1, b2)\
- (!( BOXLEFT(b1)+eul>=BOXRIGHT(b2) ||\
- BOXBOTTOM(b1)+eul>=BOXTOP(b2) ||\
- BOXRIGHT(b1)-eul<=BOXLEFT(b2) ||\
- BOXTOP(b1)-eul<=BOXBOTTOM(b2) ))
+ (!( BOXLEFT(b1)+eps>=BOXRIGHT(b2) ||\
+ BOXBOTTOM(b1)+eps>=BOXTOP(b2) ||\
+ BOXRIGHT(b1)-eps<=BOXLEFT(b2) ||\
+ BOXTOP(b1)-eps<=BOXBOTTOM(b2) ))
#define MIN2(x,y) ( (x)<(y) ? (x) : (y) )
#define MAX2(x,y) ( (x)>(y) ? (x) : (y) )
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 9ce70ee2ee7..0b3ab2f0afc 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -434,7 +434,7 @@ int isect_ray_tri_v3(float p1[3], float d[3], float v0[3], float v1[3], float v2
cross_v3_v3v3(p, d, e2);
a = dot_v3v3(e1, p);
/* note: these values were 0.000001 in 2.4x but for projection snapping on
- * a human head (1BU==1m), subsurf level 2, this gave many errors */
+ * a human head (1BU==1m), subsurf level 2, this gave many errors - campbell */
if ((a > -0.00000001) && (a < 0.00000001)) return 0;
f = 1.0f/a;
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 66231cef90b..79a5d3d5cd1 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -152,12 +152,12 @@ static void rna_def_region(BlenderRNA *brna)
prop= RNA_def_property(srna, "width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "winx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Width", "Area width.");
+ RNA_def_property_ui_text(prop, "Width", "Region width.");
prop= RNA_def_property(srna, "height", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "winy");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Height", "Area height.");
+ RNA_def_property_ui_text(prop, "Height", "Region height.");
}
static void rna_def_screen(BlenderRNA *brna)
diff --git a/source/blender/python/generic/Geometry.c b/source/blender/python/generic/Geometry.c
index a49b93adabd..0d59df6ceca 100644
--- a/source/blender/python/generic/Geometry.c
+++ b/source/blender/python/generic/Geometry.c
@@ -45,7 +45,7 @@
#include "BLI_math.h"
#define SWAP_FLOAT(a,b,tmp) tmp=a; a=b; b=tmp
-#define eul 0.000001
+#define eps 0.000001
/*-- forward declarations -- */
static PyObject *M_Geometry_PolyFill( PyObject * self, PyObject * polyLineSeq );
@@ -252,18 +252,18 @@ static PyObject *M_Geometry_LineIntersect2D( PyObject * self, PyObject * args )
Py_RETURN_NONE;
}
/* Make sure the hoz/vert line comes first. */
- if (fabs(b1x - b2x) < eul || fabs(b1y - b2y) < eul) {
+ if (fabs(b1x - b2x) < eps || fabs(b1y - b2y) < eps) {
SWAP_FLOAT(a1x, b1x, xi); /*abuse xi*/
SWAP_FLOAT(a1y, b1y, xi);
SWAP_FLOAT(a2x, b2x, xi);
SWAP_FLOAT(a2y, b2y, xi);
}
- if (fabs(a1x-a2x) < eul) { /* verticle line */
- if (fabs(b1x-b2x) < eul){ /*verticle second line */
+ if (fabs(a1x-a2x) < eps) { /* verticle line */
+ if (fabs(b1x-b2x) < eps){ /*verticle second line */
Py_RETURN_NONE; /* 2 verticle lines dont intersect. */
}
- else if (fabs(b1y-b2y) < eul) {
+ else if (fabs(b1y-b2y) < eps) {
/*X of vert, Y of hoz. no calculation needed */
newvec[0]= a1x;
newvec[1]= b1y;
@@ -280,8 +280,8 @@ static PyObject *M_Geometry_LineIntersect2D( PyObject * self, PyObject * args )
newvec[0]= a1x;
newvec[1]= yi;
return newVectorObject(newvec, 2, Py_NEW, NULL);
- } else if (fabs(a2y-a1y) < eul) { /* hoz line1 */
- if (fabs(b2y-b1y) < eul) { /*hoz line2*/
+ } else if (fabs(a2y-a1y) < eps) { /* hoz line1 */
+ if (fabs(b2y-b1y) < eps) { /*hoz line2*/
Py_RETURN_NONE; /*2 hoz lines dont intersect*/
}