summaryrefslogtreecommitdiff
path: root/src/simulation/elements/FWRK.cpp
diff options
context:
space:
mode:
authorBryan Hoyle <starfoxprime@gmail.com>2012-11-16 21:51:55 (GMT)
committer Bryan Hoyle <starfoxprime@gmail.com>2012-11-16 21:51:55 (GMT)
commit874cd400093c38e67fde4a1861603bce83135539 (patch)
treee9c8b31b7cc752133dd0e110c652ed9775e859d5 /src/simulation/elements/FWRK.cpp
parente0aa92b017a8d5602ce8b43f6e240ab42a25fac4 (diff)
parentd8be547c734cfaa3d121412b11381b4787380762 (diff)
downloadpowder-874cd400093c38e67fde4a1861603bce83135539.zip
powder-874cd400093c38e67fde4a1861603bce83135539.tar.gz
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/simulation/elements/FWRK.cpp')
-rw-r--r--src/simulation/elements/FWRK.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simulation/elements/FWRK.cpp b/src/simulation/elements/FWRK.cpp
index 6889f91..f05db69 100644
--- a/src/simulation/elements/FWRK.cpp
+++ b/src/simulation/elements/FWRK.cpp
@@ -61,7 +61,7 @@ int Element_FWRK::update(UPDATE_FUNC_ARGS)
gx += sinf(angle)*sim->elements[PT_FWRK].Gravity*0.5f;
gy += cosf(angle)*sim->elements[PT_FWRK].Gravity*0.5f;
}
- gmax = fmaxf(fabsf(gx), fabsf(gy));
+ gmax = std::max(fabsf(gx), fabsf(gy));
if (sim->eval_move(PT_FWRK, (int)(x-(gx/gmax)+0.5f), (int)(y-(gy/gmax)+0.5f), NULL))
{
multiplier = 15.0f/sqrtf(gx*gx+gy*gy);