summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Projector.cpp
diff options
context:
space:
mode:
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);