aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2016-01-02 07:28:40 +0100
committerMattias Andrée <maandree@member.fsf.org>2016-01-02 07:28:40 +0100
commit37fe53a1388c07da2ca5afab45aa40a4f9e41b63 (patch)
tree54146f7d109f0d2c6f9cb70f64e98991b1d0ebe0 /src
parentwhitespace (diff)
downloadradharc-37fe53a1388c07da2ca5afab45aa40a4f9e41b63.tar.gz
radharc-37fe53a1388c07da2ca5afab45aa40a4f9e41b63.tar.bz2
radharc-37fe53a1388c07da2ca5afab45aa40a4f9e41b63.tar.xz
m fix
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src')
-rw-r--r--src/blackbody.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blackbody.c b/src/blackbody.c
index ca337ae..8bb5873 100644
--- a/src/blackbody.c
+++ b/src/blackbody.c
@@ -22,6 +22,7 @@
#include "blackbody.h"
#include <unistd.h>
#include <math.h>
+#include <errno.h>
@@ -90,7 +91,7 @@ ciexyy_to_srgb(double x, double y, double Y, double *r, double *g, double *b)
* @param b Output parameter for the blue value.
*/
static void
-interpolate(double x1, double y1, double x2, double y2, double temp, double *r, double *g, double *g)
+interpolate(double x1, double y1, double x2, double y2, double temp, double *r, double *g, double *b)
{
double weight = fmod(temp, (double)DELTA) / (double)DELTA;
double x = x1 * (1 - weight) + x2 * weight;