Changeset 13041 for OpenSceneGraph/trunk/src/osg/Math.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osg/Math.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/Math.cpp
r12454 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 33 33 *ptr!=0 && 34 34 ((*ptr>='0' && *ptr<='9') || 35 (*ptr>='a' && *ptr<='f') || 35 (*ptr>='a' && *ptr<='f') || 36 36 (*ptr>='A' && *ptr<='F')) 37 37 ) … … 42 42 ++ptr; 43 43 } 44 44 45 45 // OSG_NOTICE<<"Read "<<str<<" result = "<<value<<std::endl; 46 46 return value; 47 47 } 48 48 49 49 ptr = str; 50 50 51 51 bool hadDecimal[2]; 52 52 double value[2]; 53 53 double sign[2]; 54 54 double decimalMultiplier[2]; 55 55 56 56 hadDecimal[0] = hadDecimal[1] = false; 57 57 sign[0] = sign[1] = 1.0; … … 59 59 decimalMultiplier[0] = decimalMultiplier[1] = 0.1; 60 60 int pos = 0; 61 61 62 62 // compute mantissa and exponent parts 63 63 while (*ptr!=0 && pos<2) … … 90 90 { 91 91 if (pos==1) break; 92 92 93 93 pos = 1; 94 94 }
