From 78711fb1db340fe6dfa3083a099d44eb10bc9ca9 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Wed, 28 Jan 2026 17:06:53 -0500 Subject: [PATCH] fix whitespace --- src/renderer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/renderer.cpp b/src/renderer.cpp index 6ecf224..1a09210 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -154,10 +154,10 @@ static bool has_target_changed(RenderState* render_state) { static void update_camera_target(RenderState* render_state, SimulationState* sim) { if (render_state->selected_body_index >= 0) { CelestialBody* body = &sim->bodies[render_state->selected_body_index]; - + // Camera target is at origin for selected body render_state->camera.target = (Vector3){0, 0, 0}; - + // Set initial camera position based on children distance float distance = get_initial_camera_distance(body, sim, render_state); render_state->camera.position = (Vector3){0, distance * 0.3f, distance}; @@ -267,11 +267,11 @@ void update_camera(RenderState* render_state, SimulationState* sim) { // Calculate initial camera distance based on children of the selected body float get_initial_camera_distance(CelestialBody* body, SimulationState* sim, RenderState* render_state) { int body_index = body - sim->bodies; - + // Calculate average distance to children (bodies and spacecraft) int child_count = 0; double total_distance = 0.0; - + // Check body children for (int i = 0; i < sim->body_count; i++) { if (sim->bodies[i].parent_index == body_index) { @@ -280,7 +280,7 @@ float get_initial_camera_distance(CelestialBody* body, SimulationState* sim, Ren total_distance += dist * render_state->distance_scale; } } - + // Check spacecraft children for (int i = 0; i < sim->craft_count; i++) { if (sim->spacecraft[i].parent_index == body_index) { @@ -289,11 +289,11 @@ float get_initial_camera_distance(CelestialBody* body, SimulationState* sim, Ren total_distance += dist * render_state->distance_scale; } } - + if (child_count > 0) { return (float)(total_distance / child_count); } - + // No children - use 100x body radius as fallback float body_radius = scale_radius(body->radius, render_state->distance_scale); return body_radius * 100.0f;