implement sin and cos table
This commit is contained in:
@@ -164,7 +164,7 @@ impl Grid {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn tick(&mut self) {
|
||||
pub fn tick(&mut self, sin_table: Vec<f32>, cos_table: Vec<f32>) {
|
||||
let (width, height) = (self.width, self.height);
|
||||
let PopulationConfig {
|
||||
sensor_distance,
|
||||
@@ -180,7 +180,7 @@ impl Grid {
|
||||
agent.tick(&buf,
|
||||
sensor_distance, sensor_angle,
|
||||
rotation_angle, step_distance,
|
||||
width, height);
|
||||
width, height, &sin_table, &cos_table);
|
||||
});
|
||||
self.deposit_all();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user