[Plib-cvs] CVS: plib/src/sg sg.cxx,1.28,1.29
Brought to you by:
sjbaker
From: Norman V. <nh...@us...> - 2002-04-12 14:49:31
|
Update of /cvsroot/plib/plib/src/sg In directory usw-pr-cvs1:/tmp/cvs-serv7722 Modified Files: sg.cxx Log Message: Minor optimization for sgSetCoord to multiply by the inverse instead of division Index: sg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.cxx,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- sg.cxx 25 Jan 2002 16:28:00 -0000 1.28 +++ sg.cxx 12 Apr 2002 14:49:26 -0000 1.29 @@ -900,10 +900,11 @@ } else { - SGfloat sr = _sgClampToUnity ( -mat[0][2] / cp ) ; - SGfloat cr = _sgClampToUnity ( mat[2][2] / cp ) ; - SGfloat sh = _sgClampToUnity ( -mat[1][0] / cp ) ; - SGfloat ch = _sgClampToUnity ( mat[1][1] / cp ) ; + cp = SG_ONE / cp ; + SGfloat sr = _sgClampToUnity ( -mat[0][2] * cp ) ; + SGfloat cr = _sgClampToUnity ( mat[2][2] * cp ) ; + SGfloat sh = _sgClampToUnity ( -mat[1][0] * cp ) ; + SGfloat ch = _sgClampToUnity ( mat[1][1] * cp ) ; if ( (sh == SG_ZERO && ch == SG_ZERO) || (sr == SG_ZERO && cr == SG_ZERO) ) { |