Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
change notation of 1e-4
Browse files Browse the repository at this point in the history
  • Loading branch information
shueja authored Aug 23, 2023
1 parent b30d0ab commit 1739fed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/path/SwervePathBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void SwervePathBuilder::WptVelocityDirection(size_t idx, double angle) {
}

void SwervePathBuilder::WptVelocityMagnitude(size_t idx, double v) {
if (std::abs(v) < 1e-4) {
if (std::abs(v) < 0.0001) {
WptZeroVelocity(idx);
} else {
WptConstraint(idx,
Expand Down Expand Up @@ -109,7 +109,7 @@ void SwervePathBuilder::SgmtVelocityDirection(size_t fromIdx, size_t toIdx,
void SwervePathBuilder::SgmtVelocityMagnitude(size_t fromIdx, size_t toIdx,
double v, bool includeWpts) {
Set2d set = EllipticalSet2d{v, v, EllipticalSet2d::Direction::kInside};
if (std::abs(v) < 1e-4) {
if (std::abs(v) < 0.0001) {
set = RectangularSet2d{0.0, 0.0};
}
SgmtConstraint(fromIdx, toIdx,
Expand Down

0 comments on commit 1739fed

Please sign in to comment.