inline decay_factor

This commit is contained in:
Simon Gardling 2025-03-28 00:17:05 -04:00
parent ab226026c3
commit b0c9d3888e
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -11,7 +11,6 @@ pub struct PopulationConfig {
pub sensor_angle: f32,
pub rotation_angle: f32,
decay_factor: f32,
deposition_amount: f32,
}
@ -27,7 +26,6 @@ impl PopulationConfig {
PopulationConfig {
sensor_distance: rng.gen_range(0.0..=64.0),
step_distance: rng.gen_range(0.2..=2.0),
decay_factor: rng.gen_range(0.1..=0.1),
sensor_angle: rng.gen_range(0.0_f32..=120.0).to_radians(),
rotation_angle: rng.gen_range(0.0_f32..=120.0).to_radians(),
deposition_amount: rng.gen_range(5.0..=5.0),
@ -92,7 +90,7 @@ impl Grid {
self.width,
self.height,
radius as f32,
self.config.decay_factor,
0.1, // decay is always 0.1
);
}