From ca379618a19e37151b8f279013362aee18d0b662 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Sun, 12 Jun 2011 04:50:56 +0000 Subject: [PATCH] Change int to float for colormap mapping This fixes a bug when using correlation coefficient --- src/plugins/radar-info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/radar-info.h b/src/plugins/radar-info.h index db0e127..100c7bd 100644 --- a/src/plugins/radar-info.h +++ b/src/plugins/radar-info.h @@ -33,7 +33,7 @@ typedef struct { extern AWeatherColormap colormaps[]; -static inline guint8 *colormap_get(AWeatherColormap *colormap, int value) +static inline guint8 *colormap_get(AWeatherColormap *colormap, float value) { int idx = value * colormap->scale + colormap->shift; return colormap->data[CLAMP(idx, 0, colormap->len)]; -- 2.43.2