summaryrefslogtreecommitdiff
path: root/app/bin/tbezier.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2025-09-20 19:20:03 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2025-09-20 19:20:03 +0200
commitb45d74b60dfb7e23911df6b0523890e42f711267 (patch)
tree42bb5764b05bd3bc5bffadb55f4375e6dce8a521 /app/bin/tbezier.c
parent6c1a798b0302034a7fdcaf93b8f014e2e458c2a0 (diff)
parent63ec5715054be18ac4db5675e067b41c955d03b9 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'app/bin/tbezier.c')
-rw-r--r--app/bin/tbezier.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/bin/tbezier.c b/app/bin/tbezier.c
index c5cff99..1fc95b1 100644
--- a/app/bin/tbezier.c
+++ b/app/bin/tbezier.c
@@ -1227,7 +1227,7 @@ BOOL_T GetTracksFromBezierSegment(trkSeg_p bezSeg, track_p newTracks[2],
if (bezSeg->type != SEG_BEZTRK) { return FALSE; }
for (int i=0; i<bezSeg->bezSegs.cnt; i++) {
trkSeg_p seg = &DYNARR_N(trkSeg_t,bezSeg->bezSegs,i);
- track_p new_trk;
+ track_p new_trk = NULL;
if (seg->type == SEG_CRVTRK) {
new_trk = NewCurvedTrack(seg->u.c.center,fabs(seg->u.c.radius),seg->u.c.a0,
seg->u.c.a1,0);
@@ -1846,12 +1846,14 @@ static DIST_T BezierMathDistance( coOrd * pos, coOrd p[4], int segments,
return dd;
}
+#ifdef LATER
static coOrd BezierMathFindNearestPoint(coOrd *pos, coOrd p[4], int segments)
{
double t = 0.0;
BezierMathDistance(pos, p, segments, &t);
return BezierPointByParameter(p, t);
}
+#endif
void BezierSlice(coOrd input[], coOrd output[], double t)
{
@@ -1937,6 +1939,7 @@ double BezierAddLengthIfClose(coOrd start[4], double error)
}
+#ifdef LATER
/**
* Use recursive splitting to get close approximation ot length of bezier
*
@@ -1947,6 +1950,7 @@ static double BezierMathLength(coOrd p[4], double error)
return BezierAddLengthIfClose(p, error); /* kick off recursion */
}
+#endif
coOrd BezierFirstDerivative(coOrd p[4], double t)
{
@@ -1988,6 +1992,7 @@ coOrd BezierSecondDerivative(coOrd p[4], double t)
return v;
}
+#ifdef LATER
/**
* Get curvature of a Bezier at a point
*/
@@ -2032,4 +2037,4 @@ static double BezierMathMinRadius(coOrd p[4])
if (curv >= 1000.0 || curv <= 0.001 ) { return 0.0; }
return 1/curv;
}
-
+#endif