mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed value rationalisation
This commit is contained in:
parent
71b8cde266
commit
9daf20e87e
@ -556,7 +556,7 @@ impl Site {
|
||||
// Update values according to the surplus of each stock
|
||||
let values = &mut self.values;
|
||||
self.surplus.iter().for_each(|(stock, surplus)| {
|
||||
let val = 3.5f32.powf(-*surplus / demand[stock]);
|
||||
let val = 3.5f32.powf(1.0 - *surplus / demand[stock]);
|
||||
values[stock] = if val > 0.001 && val < 1000.0 { Some(val) } else { None };
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user