mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
juliancoffee prefers this style
This commit is contained in:
parent
f4f1b5c77b
commit
080444fc8b
@ -99,7 +99,7 @@ impl From<Vec<(f32, LootSpec<String>)>> for ProbabilityFile {
|
||||
let rescale = if content.is_empty() {
|
||||
1.0
|
||||
} else {
|
||||
1.0 / content.iter().fold(0.0, |s, e| s + e.0)
|
||||
1.0 / content.iter().map(|e| e.0).sum::<f32>()
|
||||
};
|
||||
Self {
|
||||
content: content
|
||||
|
Loading…
Reference in New Issue
Block a user