Skip to content

Commit

Permalink
Fix whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
rickertm committed Feb 20, 2024
1 parent 78f4f6e commit 2e48b2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/rl/plan/AdvancedOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace rl
{
bool changed = true;
::rl::math::Vector inter(this->getModel()->getDofPosition());

while (changed && path.size() > 2)
{
while (changed && path.size() > 2)
Expand All @@ -76,11 +76,8 @@ namespace rl
{
::rl::math::Real ij = this->getModel()->distance(*i, *j);
::rl::math::Real jk = this->getModel()->distance(*j, *k);

::rl::math::Real alpha = ij / (ij + jk);

this->getModel()->interpolate(*i, *k, alpha, inter);

::rl::math::Real ratio = this->getModel()->distance(*j, inter) / ik;

if (ratio > this->ratio)
Expand Down
3 changes: 1 addition & 2 deletions src/rl/plan/Optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,12 @@ namespace rl
{
bool changed = false;
::rl::math::Vector inter(this->getModel()->getDofPosition());

for (VectorList::iterator i = path.begin(), j = ::std::next(i); i != path.end() && j != path.end();)
{
if (length > 0 && this->getModel()->distance(*i, *j) > length)
{
this->getModel()->interpolate(*i, *j, static_cast<::rl::math::Real>(0.5), inter);

j = path.insert(j, inter);

if (nullptr != this->getViewer())
Expand Down

0 comments on commit 2e48b2f

Please sign in to comment.