mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Use sum
instead of fold
.
This commit is contained in:
@ -1196,7 +1196,7 @@ pub fn stealth_multiplier_from_items(inventory: Option<&Inventory>) -> f32 {
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fold(0.0, |a, b| a + b)
|
.sum()
|
||||||
});
|
});
|
||||||
|
|
||||||
(1.0 / (1.0 + stealth_sum)).clamp(0.0, 1.0)
|
(1.0 / (1.0 + stealth_sum)).clamp(0.0, 1.0)
|
||||||
|
Reference in New Issue
Block a user