Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:ARM
openxcom
openxcom-abs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openxcom-abs.patch of Package openxcom
From 49bec0851fc6e5365cac0f71b2c40a80ddf95e77 Mon Sep 17 00:00:00 2001 From: Louis Delacroix <yoursecretsaresafe@googlemail.com> Date: Sun, 16 Nov 2014 20:47:41 +0000 Subject: [PATCH] Fix use of abs() for floating point arguments --- src/Battlescape/ProjectileFlyBState.cpp | 2 +- src/Geoscape/Globe.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Battlescape/ProjectileFlyBState.cpp b/src/Battlescape/ProjectileFlyBState.cpp index c890d12..2ea67ae 100644 --- a/src/Battlescape/ProjectileFlyBState.cpp +++ b/src/Battlescape/ProjectileFlyBState.cpp @@ -651,7 +651,7 @@ int ProjectileFlyBState::getMaxThrowDistance(int weight, int strength, int level if (curZ < 0 && dz < 0) //roll back { dz = std::max(dz, -1.0); - if (abs(dz)>1e-10) //rollback horizontal + if (std::abs(dz)>1e-10) //rollback horizontal dist -= curZ / dz; break; } diff --git a/src/Geoscape/Globe.cpp b/src/Geoscape/Globe.cpp index e5249ce..1a360dd 100755 --- a/src/Geoscape/Globe.cpp +++ b/src/Geoscape/Globe.cpp @@ -1217,12 +1217,12 @@ void Globe::drawVHLine(Surface *surface, double lon1, double lat1, double lon2, if (fabs(sx)<0.01) { - seg = abs( sy/(2*M_PI)*48 ); + seg = std::abs(sy/(2*M_PI)*48); if (seg == 0) ++seg; } else { - seg = abs( sx/(2*M_PI)*96 ); + seg = std::abs(sx/(2*M_PI)*96); if (seg == 0) ++seg; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor