implement sin and cos table

This commit is contained in:
Simon Gardling
2021-04-22 02:36:45 -04:00
committed by Simon Gardling
parent 1a7912204a
commit 650edff95c
4 changed files with 67 additions and 9 deletions

View File

@@ -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();
}