Changeset 5232 in orxonox.OLD for trunk/src/lib/math
- Timestamp:
- Sep 24, 2005, 12:37:39 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/math/curve.cc
r5231 r5232 64 64 if (dirCurve) 65 65 delete dirCurve; 66 67 66 } 68 67 … … 203 202 204 203 // rebuilding the Curve itself 205 float k =0;204 float k = 0; 206 205 float n = nodeCount -1; 207 206 float binCoef = 1; 208 while( tmpNode)207 while( tmpNode) 209 208 { 210 209 tmpNode->factor = binCoef; 211 if (tmpNode =tmpNode->next)210 if( tmpNode = tmpNode->next) 212 211 { 213 binCoef *= (n-k)/(k+1);212 binCoef *= (n-k) / (k+1); 214 213 ++k; 215 214 } … … 217 216 218 217 // rebuilding the Derivation curve 219 if( this->derivation <= 1)218 if( this->derivation <= 1) 220 219 { 221 220 tmpNode = firstNode; 222 221 delete dirCurve; 223 222 dirCurve = new BezierCurve(1); 224 while( tmpNode->next)223 while( tmpNode->next) 225 224 { 226 Vector tmpVector = (tmpNode->next->position) - (tmpNode->position);225 Vector tmpVector = (tmpNode->next->position) - (tmpNode->position); 227 226 tmpVector.x*=(float)nodeCount; 228 227 tmpVector.y*=(float)nodeCount;
Note: See TracChangeset
for help on using the changeset viewer.