]> Pileus Git - aweather/commitdiff
Change int to float for colormap mapping
authorAndy Spencer <andy753421@gmail.com>
Sun, 12 Jun 2011 04:50:56 +0000 (04:50 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 12 Jun 2011 04:50:56 +0000 (04:50 +0000)
This fixes a bug when using correlation coefficient

src/plugins/radar-info.h

index db0e127161b84d3b1188eee621afbe7c0bace955..100c7bd0fa9c43810856569d245d2d1d009e9c10 100644 (file)
@@ -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)];