summaryrefslogtreecommitdiff
path: root/src/vehicles/Door.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-10 17:18:26 +0200
committeraap <aap@papnet.eu>2019-07-10 17:18:26 +0200
commit4a36d64f15f898854bb8a76be86ac9a8c536b291 (patch)
tree2ff1344fb2f1e9859ba15cd56c461d40683359f9 /src/vehicles/Door.cpp
parent80e0409d6a1bfd002b98af8d598ec940b6d6facb (diff)
added wrappers around math functions
Diffstat (limited to 'src/vehicles/Door.cpp')
-rw-r--r--src/vehicles/Door.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicles/Door.cpp b/src/vehicles/Door.cpp
index ec5eb223..25e87504 100644
--- a/src/vehicles/Door.cpp
+++ b/src/vehicles/Door.cpp
@@ -53,7 +53,7 @@ CDoor::Process(CVehicle *vehicle)
break;
}
fSpeedDiff = clamp(fSpeedDiff, -0.2f, 0.2f);
- if(fabs(fSpeedDiff) > 0.002f)
+ if(Abs(fSpeedDiff) > 0.002f)
m_fAngVel += fSpeedDiff;
m_fAngVel *= 0.945f;
m_fAngVel = clamp(m_fAngVel, -0.3f, 0.3f);
@@ -76,7 +76,7 @@ CDoor::Process(CVehicle *vehicle)
float
CDoor::RetAngleWhenClosed(void)
{
- if(fabs(m_fMaxAngle) < fabs(m_fMinAngle))
+ if(Abs(m_fMaxAngle) < Abs(m_fMinAngle))
return m_fMaxAngle;
else
return m_fMinAngle;
@@ -85,7 +85,7 @@ CDoor::RetAngleWhenClosed(void)
float
CDoor::RetAngleWhenOpen(void)
{
- if(fabs(m_fMaxAngle) < fabs(m_fMinAngle))
+ if(Abs(m_fMaxAngle) < Abs(m_fMinAngle))
return m_fMinAngle;
else
return m_fMaxAngle;
@@ -104,7 +104,7 @@ bool
CDoor::IsFullyOpen(void)
{
// why -0.5? that's around 28 deg less than fully open
- if(fabs(m_fAngle) < fabs(RetAngleWhenOpen()) - 0.5f)
+ if(Abs(m_fAngle) < Abs(RetAngleWhenOpen()) - 0.5f)
return false;
return true;
}