From d7e67a208f643204a033f177e523f00cb621c1ed Mon Sep 17 00:00:00 2001 From: Jon Lund Steffensen Date: Mon, 21 Oct 2013 15:04:52 -0400 Subject: Fix slight wobble in temperature caused by float. The transition variable 'adjustment_alpha' is a float. Redshift will wobble between 6499 and 6500K as the float runs out of precision. Using a double seems to solve the issue. (Thanks to Sean Hildebrand) --- src/redshift.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/redshift.c b/src/redshift.c index dbbb542..449f7f9 100644 --- a/src/redshift.c +++ b/src/redshift.c @@ -1168,7 +1168,7 @@ main(int argc, char *argv[]) /* Amount of adjustment to apply. At zero the color temperature will be exactly as calculated, and at one it will be exactly 6500K. */ - float adjustment_alpha = 0.0; + double adjustment_alpha = 0.0; #if defined(HAVE_SIGNAL_H) && !defined(__WIN32__) struct sigaction sigact; -- cgit v1.2.3-70-g09d2