Replaced pi constants with different ones.
This commit is contained in:
parent
4d83ff8c52
commit
7532554b02
2 changed files with 7 additions and 5 deletions
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#include <Thor/Vectors.hpp>
|
#include <Thor/Vectors.hpp>
|
||||||
|
|
||||||
|
#include <LTBL/Utils.h>
|
||||||
|
|
||||||
#include "generator/Generator.h"
|
#include "generator/Generator.h"
|
||||||
#include "sprites/Enemy.h"
|
#include "sprites/Enemy.h"
|
||||||
#include "sprites/Player.h"
|
#include "sprites/Player.h"
|
||||||
|
@ -82,7 +84,7 @@ Game::initLight() {
|
||||||
mPlayerAreaLight->m_radius = 250.0f;
|
mPlayerAreaLight->m_radius = 250.0f;
|
||||||
mPlayerAreaLight->m_size = 1.0f;
|
mPlayerAreaLight->m_size = 1.0f;
|
||||||
mPlayerAreaLight->m_softSpreadAngle = 0;
|
mPlayerAreaLight->m_softSpreadAngle = 0;
|
||||||
mPlayerAreaLight->m_spreadAngle = 2.0f * M_PI;
|
mPlayerAreaLight->m_spreadAngle = 2.0f * ltbl::pi;
|
||||||
mPlayerAreaLight->m_intensity = 1.1f;
|
mPlayerAreaLight->m_intensity = 1.1f;
|
||||||
mPlayerAreaLight->m_bleed = 0;
|
mPlayerAreaLight->m_bleed = 0;
|
||||||
mPlayerAreaLight->m_color = lightColor;
|
mPlayerAreaLight->m_color = lightColor;
|
||||||
|
@ -92,7 +94,7 @@ Game::initLight() {
|
||||||
|
|
||||||
mPlayerDirectionLight->m_radius = 500.0f;
|
mPlayerDirectionLight->m_radius = 500.0f;
|
||||||
mPlayerDirectionLight->m_size = 25.0f;
|
mPlayerDirectionLight->m_size = 25.0f;
|
||||||
mPlayerDirectionLight->m_softSpreadAngle = 0.1f * M_PI;
|
mPlayerDirectionLight->m_softSpreadAngle = 0.1f * ltbl::pi;
|
||||||
mPlayerDirectionLight->m_spreadAngle =
|
mPlayerDirectionLight->m_spreadAngle =
|
||||||
degreeToRadian(config.get("light_cone_angle", 0.0f));
|
degreeToRadian(config.get("light_cone_angle", 0.0f));
|
||||||
mPlayerDirectionLight->m_intensity = 5;
|
mPlayerDirectionLight->m_intensity = 5;
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
|
|
||||||
#include "Angles.h"
|
#include "Angles.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <LTBL/Utils.h>
|
||||||
|
|
||||||
float radianToDegree(float radian) {
|
float radianToDegree(float radian) {
|
||||||
return radian * 180 / M_PI;
|
return radian * 180 / ltbl::pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
float degreeToRadian(float degree) {
|
float degreeToRadian(float degree) {
|
||||||
return degree * M_PI / 180;
|
return degree * ltbl::pi / 180;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue