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>2008-03-09 19:57:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-03-09 19:57:01 +0300
commitfc6577b6c330950caeaab65eb9463c61e46254ab (patch)
tree8f01e12d5452471f1acc16c63c1dc8921accb0c5
parent47174e94ca779c1030ccbf15db10accc41087660 (diff)
replaced zero comparisons with FLT_EPSILON
-rw-r--r--source/blender/src/drawimage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index cdbe3fdd6b0..7c82e5341c7 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -601,7 +601,7 @@ void draw_uvs_sima(void)
}
}
- if (totarea==0.0 || totarea==0.0) {
+ if (totarea < FLT_EPSILON || totuvarea < FLT_EPSILON) {
col[0] = 1.0;
col[1] = col[2] = 0.0;
glColor3fv(col);
@@ -621,7 +621,7 @@ void draw_uvs_sima(void)
if ((tface=(MTFace *)efa->tmp.p)) {
area = EM_face_area(efa) / totarea;
uvarea = tface_area(tface, efa->v4!=0) / totuvarea;
- if (area==0.0 || uvarea==0.0) {
+ if (area < FLT_EPSILON || uvarea < FLT_EPSILON) {
areadiff = 1.0;
} else if (area>uvarea) {
areadiff = 1.0-(uvarea/area);