[DEV] change the vector3D function

This commit is contained in:
Edouard DUPIN 2012-10-29 18:05:27 +01:00
parent 4c65a1049a
commit 9ca566ed85
2 changed files with 3 additions and 3 deletions

View File

@ -408,8 +408,8 @@ void draw::Image::DistanceField(etk::Vector2D<int32_t> pos, etk::Vector2D<int32_
etk::Vector2D<int32_t> elem1 = grid1.Get(tmpPos);
etk::Vector2D<int32_t> elem2 = grid2.Get(tmpPos);
// Calculate the actual distance from the x/y
float dist1 = sqrt( (double)elem1.QuadDist() );
float dist2 = sqrt( (double)elem2.QuadDist() );
float dist1 = elem1.GetLength();
float dist2 = elem2.GetLength();
float dist = dist1 - dist2;
/*
if (tmpPos.y < 32) {

View File

@ -173,7 +173,7 @@ class Grid
etk::Vector2D<int32_t> other = Get(pos);
other.x += offsetx;
other.y += offsety;
if (other.QuadDist() < p.QuadDist()) {
if (other.GetSquaredLength() < p.GetSquaredLength()) {
p = other;
}
};