Skip to content

Commit

Permalink
Ensure 2 samples when drawing paths
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrott committed Oct 21, 2023
1 parent a6b4dbe commit e291d59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public FollowTrajectoryAction(TimeTrajectory t) {

List<Double> disps = com.acmerobotics.roadrunner.Math.range(
0, t.path.length(),
(int) Math.ceil(t.path.length() / 2));
Math.max(2, (int) Math.ceil(t.path.length() / 2)));
xPoints = new double[disps.size()];
yPoints = new double[disps.size()];
for (int i = 0; i < disps.size(); i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public FollowTrajectoryAction(TimeTrajectory t) {

List<Double> disps = com.acmerobotics.roadrunner.Math.range(
0, t.path.length(),
(int) Math.ceil(t.path.length() / 2));
Math.max(2, (int) Math.ceil(t.path.length() / 2)));
xPoints = new double[disps.size()];
yPoints = new double[disps.size()];
for (int i = 0; i < disps.size(); i++) {
Expand Down

0 comments on commit e291d59

Please sign in to comment.