diff options
Diffstat (limited to 'src/mesa/swrast/s_aalinetemp.h')
-rw-r--r-- | src/mesa/swrast/s_aalinetemp.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index 53a2b55ddf5..262af3ee3b3 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -1,4 +1,4 @@ -/* $Id: s_aalinetemp.h,v 1.8 2001/05/03 22:13:32 brianp Exp $ */ +/* $Id: s_aalinetemp.h,v 1.9 2001/05/10 17:41:41 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -166,14 +166,12 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) line.dy = line.y1 - line.y0; line.len = sqrt(line.dx * line.dx + line.dy * line.dy); line.halfWidth = 0.5F * ctx->Line.Width; - if (line.len == 0.0) { - line.xAdj = 0.0; - line.yAdj = 0.0; - } - else { - line.xAdj = line.dx / line.len * line.halfWidth; - line.yAdj = line.dy / line.len * line.halfWidth; - } + + if (line.len == 0.0) + return; + + line.xAdj = line.dx / line.len * line.halfWidth; + line.yAdj = line.dy / line.len * line.halfWidth; #ifdef DO_Z compute_plane(line.x0, line.y0, line.x1, line.y1, |