All pastes #17413 Raw Edit

Something

public text v1 · immutable
#17413 ·published 2005-07-11 00:10 UTC
rendered paste body
Index: OgreMain/src/OgreRotationSpline.cpp
===================================================================
RCS file: /cvsroot/ogre/ogrenew/OgreMain/src/OgreRotationSpline.cpp,v
retrieving revision 1.12
diff -u -r1.12 OgreRotationSpline.cpp
--- OgreMain/src/OgreRotationSpline.cpp	4 Feb 2005 17:50:10 -0000	1.12
+++ OgreMain/src/OgreRotationSpline.cpp	9 Jul 2005 22:05:32 -0000
@@ -50,7 +50,7 @@
     Quaternion RotationalSpline::interpolate(Real t, bool useShortestPath)
     {
         // Work out which segment this is in
-        Real fSeg = t * mPoints.size();
+        Real fSeg = t * (mPoints.size() - 1);
         unsigned int segIdx = (unsigned int)fSeg;
         // Apportion t 
         t = fSeg - segIdx;
Index: OgreMain/src/OgreSimpleSpline.cpp
===================================================================
RCS file: /cvsroot/ogre/ogrenew/OgreMain/src/OgreSimpleSpline.cpp,v
retrieving revision 1.12
diff -u -r1.12 OgreSimpleSpline.cpp
--- OgreMain/src/OgreSimpleSpline.cpp	4 Feb 2005 17:50:16 -0000	1.12
+++ OgreMain/src/OgreSimpleSpline.cpp	9 Jul 2005 21:57:55 -0000
@@ -77,7 +77,7 @@
 
         
         // Work out which segment this is in
-        Real fSeg = t * mPoints.size();
+        Real fSeg = t * (mPoints.size() - 1);
         unsigned int segIdx = (unsigned int)fSeg;
         // Apportion t 
         t = fSeg - segIdx;