diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 10:46:32 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 10:46:32 +0200 |
commit | 5447ddd896eb49ea9fd9f9191a277fd1d5730aa3 (patch) | |
tree | 96e09b8fb5d757aafef33da50a93204bae54ba9f /src/crepe/api/ParticleEmitter.cpp | |
parent | 0b08b742fffa63188c89d760a5aecd55d585403b (diff) |
add PR #9 comments as code comments
Diffstat (limited to 'src/crepe/api/ParticleEmitter.cpp')
-rw-r--r-- | src/crepe/api/ParticleEmitter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp index 2e07562..0b3a9ee 100644 --- a/src/crepe/api/ParticleEmitter.cpp +++ b/src/crepe/api/ParticleEmitter.cpp @@ -18,9 +18,11 @@ ParticleEmitter::ParticleEmitter(uint32_t game_object_id, std::srand( static_cast<uint32_t>(std::time(nullptr))); // initialize random seed std::cout << "Create emitter" << std::endl; - min_angle = (360 + angle - (angleOffset % 360)) % 360; // calculate minAngle - max_angle = (360 + angle + (angleOffset % 360)) % 360; // calculate maxAngle - position.x = 400; + // FIXME: Why do these expressions start with `360 +`, only to be `% 360`'d + // right after? This does not make any sense to me. + min_angle = (360 + angle - (angleOffset % 360)) % 360; + max_angle = (360 + angle + (angleOffset % 360)) % 360; + position.x = 400; // FIXME: what are these magic values? position.y = 400; for (size_t i = 0; i < max_particles; i++) { this->particles.emplace_back(); |