diff options
author | Eric Fry | 2018-06-28 22:50:20 +1000 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 8e43261d13a81131e0be0bfc75627f7395f78a90 (patch) | |
tree | e6f2d38900233da689bb59d3ec293f14b510a4b6 /engines/illusions/fixedpoint.cpp | |
parent | fee1f3d8cb065182322bc80aba39a66a1b4b0cfb (diff) | |
download | scummvm-rg350-8e43261d13a81131e0be0bfc75627f7395f78a90.tar.gz scummvm-rg350-8e43261d13a81131e0be0bfc75627f7395f78a90.tar.bz2 scummvm-rg350-8e43261d13a81131e0be0bfc75627f7395f78a90.zip |
ILLUSIONS: Formatting fixes
Simplified some point arithmetic
Lock fixedpoint calcs to float rather than double
Diffstat (limited to 'engines/illusions/fixedpoint.cpp')
-rw-r--r-- | engines/illusions/fixedpoint.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/illusions/fixedpoint.cpp b/engines/illusions/fixedpoint.cpp index f240b14ab1..18c76df0d9 100644 --- a/engines/illusions/fixedpoint.cpp +++ b/engines/illusions/fixedpoint.cpp @@ -52,7 +52,7 @@ int16 fixedTrunc(FixedPoint16 value) { FixedPoint16 fixedDistance(FixedPoint16 x1, FixedPoint16 y1, FixedPoint16 x2, FixedPoint16 y2) { float xd = fixedToFloat(x1) - fixedToFloat(x2); float yd = fixedToFloat(y1) - fixedToFloat(y2); - if (xd != 0.0 || yd != 0.0) + if (xd != 0.0f || yd != 0.0f) return floatToFixed(sqrt(xd * xd + yd * yd)); return 0; } |