summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/see/ovision.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/see/ovision.cc')
-rw-r--r--2005/i/robert/src/ovision/see/ovision.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/2005/i/robert/src/ovision/see/ovision.cc b/2005/i/robert/src/ovision/see/ovision.cc
index a316306..2cbb4a1 100644
--- a/2005/i/robert/src/ovision/see/ovision.cc
+++ b/2005/i/robert/src/ovision/see/ovision.cc
@@ -136,8 +136,10 @@ OVision::getLoc (Zone &zone, int &x, int &y, int &angle, int &dist)
int tmpY = (int)((zone.ymax - zone.centery) * newPcY + zone.centery);
int newX, newY;
space_->getLoc (tmpX, tmpY, newX, newY);
- angle = (int)(atan (newX / (newY + 9)));
- dist = newY;
+ angle = (int)(atan ((double)newX / ((double)newY + 90)));
+ x = newX; y = newY;
+ dist = (int)sqrt (y*y + x*x);
+ std::cout << "<OVision::getLoc> " << " " << newX << " " << newY << " " << angle << " " << dist << "\n";
}
/// Renvoie la liste des quilles