aboutsummaryrefslogtreecommitdiffstats
path: root/src/redshift.c
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2014-12-27 19:30:16 -0500
committerJon Lund Steffensen <jonlst@gmail.com>2014-12-27 19:30:16 -0500
commitc00bcff953c8323cb635475c9f0f3bebab82854e (patch)
tree5b81a5d15e821f089ab22da05dd20ee54e873566 /src/redshift.c
parentredshift-gtk: Split status icon into controller and interface (diff)
downloadredshift-ng-c00bcff953c8323cb635475c9f0f3bebab82854e.tar.gz
redshift-ng-c00bcff953c8323cb635475c9f0f3bebab82854e.tar.bz2
redshift-ng-c00bcff953c8323cb635475c9f0f3bebab82854e.tar.xz
redshift: Use double for interpolation function
Diffstat (limited to 'src/redshift.c')
-rw-r--r--src/redshift.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/redshift.c b/src/redshift.c
index 818db4e..8fb2ddf 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -338,15 +338,15 @@ print_period(double elevation)
}
/* Interpolate value based on the specified solar elevation. */
-static float
-calculate_interpolated_value(double elevation, float day, float night)
+static double
+calculate_interpolated_value(double elevation, double day, double night)
{
- float result;
+ double result;
if (elevation < transition_low) {
result = night;
} else if (elevation < transition_high) {
/* Transition period: interpolate */
- float a = (transition_low - elevation) /
+ double a = (transition_low - elevation) /
(transition_low - transition_high);
result = (1.0-a)*night + a*day;
} else {