Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2011, 4:46:26 AM (13 years ago)
Author:
rgrieder
Message:

Removed double precision versions of the mathematical constants and added math::twoPi.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2/src/orxonox/controllers/ArtificialController.cc

    r7801 r8333  
    847847                Vector3 distanceCurrent = this->targetPosition_ - this->getControllableEntity()->getPosition();
    848848                Vector3 distanceNew = it->getPosition() - this->getControllableEntity()->getPosition();
    849                 if (!this->target_ || it->getPosition().squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceNew) / speed / distanceNew.length()) / (2 * math::pi))
    850                         < this->targetPosition_.squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceCurrent) / speed / distanceCurrent.length()) / (2 * math::pi)) + rnd(-250, 250))
     849                if (!this->target_ || it->getPosition().squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceNew) / speed / distanceNew.length()) / math::twoPi)
     850                        < this->targetPosition_.squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceCurrent) / speed / distanceCurrent.length()) / math::twoPi) + rnd(-250, 250))
    851851                {
    852852                    this->target_ = (*it);
Note: See TracChangeset for help on using the changeset viewer.