summaryrefslogtreecommitdiff
path: root/src/game/GameView.cpp
diff options
context:
space:
mode:
authorntoskrnl <ntoskrnl11@yahoo.com>2012-08-02 20:04:35 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-04 10:32:48 (GMT)
commitbaf07e470e50905148784eb6008cf69878440dfa (patch)
treefa0d35c746585bbd5a24a52a3fe7565aeaccb73e /src/game/GameView.cpp
parentd6e384e1ecbe4b2610277f22ff30286a4620b990 (diff)
downloadpowder-baf07e470e50905148784eb6008cf69878440dfa.zip
powder-baf07e470e50905148784eb6008cf69878440dfa.tar.gz
Build fixes for FreeBSD
Diffstat (limited to 'src/game/GameView.cpp')
-rw-r--r--src/game/GameView.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 4bbb811..b0736b4 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -1544,7 +1544,7 @@ ui::Point GameView::lineSnapCoords(ui::Point point1, ui::Point point2)
{
ui::Point newPoint(0, 0);
float snapAngle = floor(atan2(point2.Y-point1.Y, point2.X-point1.X)/(M_PI*0.25)+0.5)*M_PI*0.25;
- float lineMag = sqrtf(pow(point2.X-point1.X,2)+pow(point2.Y-point1.Y,2));
+ float lineMag = sqrtf(pow((float)(point2.X-point1.X),2)+pow((float)(point2.Y-point1.Y),2));
newPoint.X = (int)(lineMag*cos(snapAngle)+point1.X+0.5f);
newPoint.Y = (int)(lineMag*sin(snapAngle)+point1.Y+0.5f);
return newPoint;