# HG changeset patch # User Matti Hamalainen # Date 1425053558 -7200 # Node ID 2fac0a28ff51aea612b1f5a3d34c14f2a1816a70 # Parent 0ba1ec9b8608caa21a6ff27aa275621cfae0f592# Parent 98e749d990b04822f8f2a58e038c5eed11222204 Merged. diff -r 98e749d990b0 -r 2fac0a28ff51 src/dmcurves.c --- a/src/dmcurves.c Fri Feb 27 18:06:23 2015 +0200 +++ b/src/dmcurves.c Fri Feb 27 18:12:38 2015 +0200 @@ -44,13 +44,10 @@ int i; for (i = 0; i != slod; i++) { - // use the parametric time value 0.0 to 1.0 for this curve segment const float t = (float) i / slod; - - // inverse value of 't' const float it = 1.0f - t; - // calculate blending functions for cubic bspline + // Calculate blending functions for cubic bspline const float t2 = t * t; const float t3 = t2 * t; const float b0 = it * it * it / 6.0f; @@ -58,7 +55,7 @@ const float b2 = (-3*t3 + 3*t2 + 3*t + 1) / 6.0f; const float b3 = t3 / 6.0f; - // calculate the x,y and z of the curve point + // Calculate coordinates of the curve point curr->x = b0 * dmSplineGetPoint(points, npoints, cv + 0)->x + b1 * dmSplineGetPoint(points, npoints, cv + 1)->x + b2 * dmSplineGetPoint(points, npoints, cv + 2)->x +