diff options
Diffstat (limited to 'src/crepe/ParticleSystem.cpp')
-rw-r--r-- | src/crepe/ParticleSystem.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/crepe/ParticleSystem.cpp b/src/crepe/ParticleSystem.cpp index aff7a30..8891e2b 100644 --- a/src/crepe/ParticleSystem.cpp +++ b/src/crepe/ParticleSystem.cpp @@ -1,10 +1,12 @@ -#include "ParticleSystem.hpp" +#include "ParticleSystem.h" #include <cmath> // #include <cstdlib> #include <ctime> #include <iostream> // include iostream for std::cout -#include "ParticleEmitter.hpp" -#include "Particle.hpp" +#include "ParticleEmitter.h" +#include "Particle.h" + +using namespace crepe; ParticleSystem::ParticleSystem() : m_elapsedTime(0.0f) {} // Initialize m_elapsedTime to 0 @@ -39,11 +41,11 @@ void ParticleSystem::emitParticle(ParticleEmitter& emitter) { //check if value is overthe 360 degrees if(emitter.m_maxAngle < emitter.m_minAngle) { - randomAngle = ((emitter.m_minAngle + (std::rand() % (static_cast<int>(emitter.m_maxAngle + 360 - emitter.m_minAngle + 1))))%360); + randomAngle = ((emitter.m_minAngle + (std::rand() % (static_cast<uint32_t>(emitter.m_maxAngle + 360 - emitter.m_minAngle + 1))))%360); } else { - randomAngle = emitter.m_minAngle + (std::rand() % (static_cast<int>(emitter.m_maxAngle - emitter.m_minAngle + 1))); + randomAngle = emitter.m_minAngle + (std::rand() % (static_cast<uint32_t>(emitter.m_maxAngle - emitter.m_minAngle + 1))); } |