summaryrefslogtreecommitdiffstats
path: root/src/core/General.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-09-17 22:43:43 +0200
committerGitHub <noreply@github.com>2019-09-17 22:43:43 +0200
commit5d98e12b85565d84b980bcc2ea73fd449691c943 (patch)
treee6b421513dfac9908ae727290ab7ec947842cdf3 /src/core/General.h
parentMerge pull request #208 from Nick007J/master (diff)
parentPeds, a fix and a tad of VC (diff)
downloadre3-5d98e12b85565d84b980bcc2ea73fd449691c943.tar
re3-5d98e12b85565d84b980bcc2ea73fd449691c943.tar.gz
re3-5d98e12b85565d84b980bcc2ea73fd449691c943.tar.bz2
re3-5d98e12b85565d84b980bcc2ea73fd449691c943.tar.lz
re3-5d98e12b85565d84b980bcc2ea73fd449691c943.tar.xz
re3-5d98e12b85565d84b980bcc2ea73fd449691c943.tar.zst
re3-5d98e12b85565d84b980bcc2ea73fd449691c943.zip
Diffstat (limited to 'src/core/General.h')
-rw-r--r--src/core/General.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/core/General.h b/src/core/General.h
index 366c571c..d73cf36f 100644
--- a/src/core/General.h
+++ b/src/core/General.h
@@ -54,14 +54,7 @@ public:
static float LimitRadianAngle(float angle)
{
- float result;
-
- if (angle < -25.0f)
- result = -25.0f;
- else if (angle > 25.0f)
- result = 25.0f;
- else
- result = angle;
+ float result = clamp(angle, -25.0f, 25.0f);
while (result >= PI) {
result -= 2 * PI;