Use gk::abs instead of defining an ABS macro

This commit is contained in:
Pedro Gimeno 2020-07-27 20:43:15 +02:00 committed by Gitea
parent 0a88bec7fb
commit 6202717443
2 changed files with 5 additions and 5 deletions

2
external/gamekit vendored

@ -1 +1 @@
Subproject commit 59900e7001e54a3c33049a7cd0168dffb2214bec
Subproject commit 63755c6be5d724657881f06fd6a322694e9672d1

View File

@ -27,7 +27,7 @@
#ifndef ENGINECONFIG_HPP_
#define ENGINECONFIG_HPP_
#define ABS(x) ((x) < 0? -(x) : (x))
#include <gk/math/Math.hpp>
namespace {
// Only used in Client
@ -41,9 +41,9 @@ namespace {
constexpr float DIST_FAR = 1000.0f;
constexpr float SKYBOX_OFFSET_Z = -50.f;
constexpr float DIST_SUN = DIST_FAR - ABS(SKYBOX_OFFSET_Z) - 50.f;
constexpr float DIST_MOON = DIST_FAR - ABS(SKYBOX_OFFSET_Z) - 50.f;
constexpr float DIST_STARS = DIST_FAR - ABS(SKYBOX_OFFSET_Z) - 25.f;
constexpr float DIST_SUN = DIST_FAR - gk::abs(SKYBOX_OFFSET_Z) - 50.f;
constexpr float DIST_MOON = DIST_FAR - gk::abs(SKYBOX_OFFSET_Z) - 50.f;
constexpr float DIST_STARS = DIST_FAR - gk::abs(SKYBOX_OFFSET_Z) - 25.f;
constexpr float DIST_2D_NEAR = -512.0f;
constexpr float DIST_2D_FAR = 512.0f;