sqrt() doesn't work on integers

develop
Quietust 2012-03-03 16:06:31 -06:00
parent 2b2c30ac43
commit a0b671b289
1 changed files with 1 additions and 1 deletions

@ -547,7 +547,7 @@ static std::string formatDirection(df::coord delta)
else
dir = "***";
int dist = (int)sqrt(delta.x*delta.x + delta.y*delta.y);
int dist = (int)sqrt((double)(delta.x*delta.x + delta.y*delta.y));
return stl_sprintf("%d away %s %+d", dist, dir.c_str(), delta.z);
}