diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/drawimage.c | 4 |
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); |