Skip to content

Commit

Permalink
Fixed|Line: Avoid conversion to integer
Browse files Browse the repository at this point in the history
de::floor returns an integer while std::floor returns a floating
point type. Here a coord_t was expected.
  • Loading branch information
skyjake committed May 5, 2013
1 parent 39e23dd commit 6a1dde1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doomsday/client/src/map/line.cpp
Expand Up @@ -646,8 +646,8 @@ int Line::boxOnSide_FixedPrecision(AABoxd const &box) const
* so we won't change the discretization of the fractional part into 16-bit
* precision.
*/
coord_t offset[2] = { de::floor(d->from->origin().x + d->direction.x/2),
de::floor(d->from->origin().y + d->direction.y/2) };
coord_t offset[2] = { std::floor(d->from->origin().x + d->direction.x/2.0),
std::floor(d->from->origin().y + d->direction.y/2.0) };

fixed_t boxx[4];
boxx[BOXLEFT] = DBL2FIX(box.minX - offset[VX]);
Expand Down

0 comments on commit 6a1dde1

Please sign in to comment.