Skip to content

Commit

Permalink
Fix y axis not adjusting correctly in plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Yilmaz4 committed Jun 20, 2024
1 parent c0b41ac commit 0e8c1ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ class NBodiment {
float time;
std::vector<float> timeAxis;
std::vector<float> kinetic_energy;
float min_ke, max_ke;
float min_ke = FLT_MAX, max_ke = FLT_MIN;

glm::ivec2 res;
glm::ivec2 pos = { 60, 60 };
Expand Down Expand Up @@ -1111,7 +1111,9 @@ class NBodiment {
void generate_scene() {
kinetic_energy.clear();
timeAxis.clear();
time = min_ke = max_ke = 0;
time = 0;
min_ke = FLT_MAX;
max_ke = FLT_MIN;
std::random_device rd;
std::mt19937 rng(rd());

Expand Down

0 comments on commit 0e8c1ac

Please sign in to comment.