mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
round to nearest integer for compressed weather
This commit is contained in:
parent
a7282f9f2e
commit
ef59e57347
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user