From 966728a29b9d3702d23c21f5359b1e9bf86d1983 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Fri, 1 Sep 2023 14:12:02 +0200 Subject: [PATCH] Calculate blend factor as double --- color_math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/color_math.c b/color_math.c index 59993a8..3e2d77a 100644 --- a/color_math.c +++ b/color_math.c @@ -192,7 +192,7 @@ struct rgb calc_whitepoint(int temp) { illuminant_d(temp, &x1, &y1); planckian_locus(temp, &x2, &y2); - double factor = (4000 - temp) / 1500; + double factor = (4000. - temp) / 1500.; double sinefactor = (cos(M_PI*factor) + 1.0) / 2.0; wp.x = x1 * sinefactor + x2 * (1.0 - sinefactor); wp.y = y1 * sinefactor + y2 * (1.0 - sinefactor);