diff options
author | Filippos Karapetis | 2013-10-17 01:08:42 +0300 |
---|---|---|
committer | Filippos Karapetis | 2013-10-17 01:09:37 +0300 |
commit | 7d7c0966a2836e9447befa6c31cbd114b9f40ef5 (patch) | |
tree | 6f10ac7db233aca49c47ce4967102678fdb947c8 /engines/fullpipe | |
parent | 8880077ec3899fc7bf752c5ede2434505b948157 (diff) | |
download | scummvm-rg350-7d7c0966a2836e9447befa6c31cbd114b9f40ef5.tar.gz scummvm-rg350-7d7c0966a2836e9447befa6c31cbd114b9f40ef5.tar.bz2 scummvm-rg350-7d7c0966a2836e9447befa6c31cbd114b9f40ef5.zip |
FULLPIPE: Fix compilation with MSVC
MSVC complains that this specific usage of sqrt() is ambiguous, since
the arguments aren't float or double
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/motion.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index aced36fa79..0c0db322f8 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -724,7 +724,7 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int movInfo1.pt2.y = ypos; MovGraphNode *nod = linkInfoDest.link->_movGraphNode1; - double dst1 = sqrt((ypos - nod->_y) * (ypos - nod->_y) + (xpos - nod->_x) * (xpos - nod->_x)); + double dst1 = sqrt((double)((ypos - nod->_y) * (ypos - nod->_y) + (xpos - nod->_x) * (xpos - nod->_x))); int dst = linkInfoDest.link->_movGraphNode2->_distance - nod->_distance; movInfo1.distance2 = nod->_distance + (dst1 * (double)dst / linkInfoDest.link->_distance); |