Skip to content

Commit a07c3cb

Browse files
committed
more total spline stuff
1 parent caa2c87 commit a07c3cb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/com/github/mittyrobotics/pathfollowing/QuinticHermiteSplineGroup.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,4 +250,14 @@ public void updateSplineLength(int index, double prevLength) {
250250
length -= prevLength;
251251
length += splines.get(index).getLength();
252252
}
253+
254+
/**
255+
* Updates the total spline length
256+
*/
257+
public void updateSplineLength() {
258+
length = 0;
259+
for(QuinticHermiteSpline spline : splines) {
260+
length += spline.getLength();
261+
}
262+
}
253263
}

0 commit comments

Comments
 (0)