From 61f19c85f4aa28c43b56c58559aac991e373e471 Mon Sep 17 00:00:00 2001 From: numzero Date: Thu, 20 Nov 2025 13:55:49 +0300 Subject: [PATCH] add sane-ish defaults to avoid ub --- ui/src/api.hxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/src/api.hxx b/ui/src/api.hxx index 19b742c..c1f3b2a 100644 --- a/ui/src/api.hxx +++ b/ui/src/api.hxx @@ -8,18 +8,18 @@ namespace ffi { struct Core; struct SphericalPosition { - float yaw; - float pitch; - float distance; + float yaw = 0.; + float pitch = 0.; + float distance = 1.; }; struct RedrawArgs { SphericalPosition camera_position; SphericalPosition light_position; - float light_radius; - float light_spread; - float accum_sigma; - float accum_scale; + float light_radius = 1.; + float light_spread = 0.; + float accum_sigma = 1.; + float accum_scale = 1.; }; } // namespace ffi