From d6e3515f50125c6a4837830a130df64d9676bda8 Mon Sep 17 00:00:00 2001 From: c vw Date: Tue, 3 Mar 2020 15:27:05 +0100 Subject: [PATCH] adjustment --- diversity_menu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/diversity_menu.c b/diversity_menu.c index 69aa604..eac362e 100644 --- a/diversity_menu.c +++ b/diversity_menu.c @@ -242,11 +242,11 @@ void diversity_menu(GtkWidget *parent) { if (div_gain < -27.0) div_gain=-27.0; while (div_phase > 180.0) div_phase -=360.0; while (div_phase < -180.0) div_phase +=360.0; - gain_coarse=round(div_gain); - if (gain_coarse > 25.0) gain_coarse= 25.0; - if (gain_coarse < -25.0) gain_coarse=-25.0; + gain_coarse=2.0*round(0.5*div_gain); + if (div_gain > 25.0) gain_coarse= 25.0; + if (div_gain < -25.0) gain_coarse=-25.0; gain_fine=div_gain-gain_coarse; - phase_coarse=2.0*round(div_phase*0.5); + phase_coarse=4.0*round(div_phase*0.25); phase_fine=div_phase-phase_coarse; GdkRGBA color; color.red = 1.0; -- 2.45.2