aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 99b24d1..a1743bf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -102,7 +102,7 @@ struct State
constexpr word_t clamp_to_width(long double value)
{
- return WIDTH / (bounds.upper - bounds.lower) * (value - bounds.lower);
+ return (WIDTH / (bounds.upper - bounds.lower)) * (value - bounds.lower);
}
void draw_bounds()
@@ -147,7 +147,7 @@ using Ms = std::chrono::milliseconds;
int main(void)
{
// Setup state
- State state{{1, 2}};
+ State state{{1, 1}};
// Setup meta text (counter, iterations, etc)
word_t count = 1, prev_count = 0;
@@ -156,9 +156,10 @@ int main(void)
word_t format_str_width = 0;
Fraction previous_leftmost, previous_rightmost;
+ // Setup timer
auto time_current = Clock::now();
auto time_previous = time_current;
- constexpr auto time_delta = 10;
+ constexpr auto time_delta = 1;
InitWindow(WIDTH, HEIGHT, "Calkin-Wilf Tree");
while (!WindowShouldClose())