summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Projector.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-10-02 21:18:30 +0200
committerAki <please@ignore.pl>2021-10-02 21:18:30 +0200
commit03bdf9c0fe25d3d9e765c13a2d18048088c3a3a0 (patch)
tree4041b56ea0b28fa4faba35b598c34f3c0af9f77d /Stars45/Projector.cpp
parentdee511588386db44ee134adf86b59ffa9a0a02fd (diff)
downloadstarshatter-03bdf9c0fe25d3d9e765c13a2d18048088c3a3a0.zip
starshatter-03bdf9c0fe25d3d9e765c13a2d18048088c3a3a0.tar.gz
starshatter-03bdf9c0fe25d3d9e765c13a2d18048088c3a3a0.tar.bz2
Replaced remaining minmax macros with std equivelants
Diffstat (limited to 'Stars45/Projector.cpp')
-rw-r--r--Stars45/Projector.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Stars45/Projector.cpp b/Stars45/Projector.cpp
index 6881682..1c2e635 100644
--- a/Stars45/Projector.cpp
+++ b/Stars45/Projector.cpp
@@ -36,6 +36,12 @@
3D Projection Camera class
*/
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+
+#include <algorithm>
+
#include "MemDebug.h"
#include "Projector.h"
@@ -101,7 +107,7 @@ Projector::SetFieldOfView(double fov)
xscreenscale = width / fov;
yscreenscale = height / fov;
- maxscale = max(xscreenscale, yscreenscale);
+ maxscale = std::max(xscreenscale, yscreenscale);
xangle = atan(2.0/fov * maxscale/xscreenscale);
yangle = atan(2.0/fov * maxscale/yscreenscale);