diff options
author | Brian Paul <[email protected]> | 2002-03-23 02:29:37 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-03-23 02:29:37 +0000 |
commit | 7de02fef5b912995a974939124ed0201e400a03f (patch) | |
tree | 04ac3cf93a98fb03969bdf06a1b10638bd05305d /src/glu/sgi/libnurbs/interface | |
parent | 819505ad2a77679bbb71a60a9aae8b2d6ddffa06 (diff) |
replaced an assertion with a conditional
Diffstat (limited to 'src/glu/sgi/libnurbs/interface')
-rw-r--r-- | src/glu/sgi/libnurbs/interface/insurfeval.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/glu/sgi/libnurbs/interface/insurfeval.cc b/src/glu/sgi/libnurbs/interface/insurfeval.cc index 4a2b5bacc39..58af2bcb63f 100644 --- a/src/glu/sgi/libnurbs/interface/insurfeval.cc +++ b/src/glu/sgi/libnurbs/interface/insurfeval.cc @@ -31,10 +31,10 @@ ** published by SGI, but has not been independently verified as being ** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ +** $Date: 2002/03/23 02:29:37 $ $Revision: 1.2 $ */ /* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/insurfeval.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/insurfeval.cc,v 1.2 2002/03/23 02:29:37 brianp Exp $ */ #include "gluos.h" @@ -528,11 +528,11 @@ void OpenGLSurfaceEvaluator::inComputeNormal2(REAL *pu, REAL *pv, REAL *n) mag = sqrt(n[0]*n[0] + n[1]*n[1] + n[2]*n[2]); - assert(mag > 0.0); /*better be some threshold*/ - n[0] /= mag; - n[1] /= mag; - n[2] /= mag; - + if (mag > 0.0) { + n[0] /= mag; + n[1] /= mag; + n[2] /= mag; + } } |