mirror of https://github.com/ecmwf/eccodes.git
ECC-1467: Use grib_power<T> in unpack()
This commit is contained in:
parent
e3ea8ecf1a
commit
c3e41cc950
|
@ -288,8 +288,8 @@ static int unpack(grib_accessor* a, T* values, size_t* len)
|
|||
}
|
||||
}
|
||||
|
||||
s = grib_power<double>(binary_scale_factor, 2);
|
||||
d = grib_power<double>(-decimal_scale_factor, 10);
|
||||
s = grib_power<T>(binary_scale_factor, 2);
|
||||
d = grib_power<T>(-decimal_scale_factor, 10);
|
||||
for (i = 0; i < numberOfSecondOrderPackedValues; i++) {
|
||||
values[i] = (T)(((X[i] * s) + reference_value) * d);
|
||||
}
|
||||
|
|
|
@ -412,8 +412,8 @@ static int unpack(grib_accessor* a, T* values, size_t* len)
|
|||
k++;
|
||||
}
|
||||
|
||||
s = grib_power<double>(binary_scale_factor, 2);
|
||||
d = grib_power<double>(-decimal_scale_factor, 10);
|
||||
s = grib_power<T>(binary_scale_factor, 2);
|
||||
d = grib_power<T>(-decimal_scale_factor, 10);
|
||||
for (i = 0; i < n; i++) {
|
||||
values[i] = (T)(((X[i] * s) + reference_value) * d);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue