round to nearest integer for compressed weather

This commit is contained in:
Isse 2024-01-25 00:35:14 +01:00
parent a7282f9f2e
commit ef59e57347

View File

@ -100,8 +100,8 @@ impl CompressedWeather {
impl From<Weather> for CompressedWeather {
fn from(weather: Weather) -> Self {
Self {
cloud: (weather.cloud * 255.0) as u8,
rain: (weather.rain * 255.0) as u8,
cloud: (weather.cloud * 255.0).round() as u8,
rain: (weather.rain * 255.0).round() as u8,
}
}
}