This pull request optimizes the raycasting system by reducing the computational overhead associated with trigonometric calculations. The primary change involves pre-calculating sine and cosine values for a range of angles used in the raycasting process. This eliminates the need to repeatedly compute these values during the main game loop, resulting in a significant performance improvement.
Additionally, the code includes a new set of unit tests to ensure the correctness and robustness of the raycasting functionality. These tests cover various aspects of the raycasting calculations, such as ray direction, wall collisions, ray length, wall hit angles, projected heights, and lighting colors. #2
This pull request optimizes the raycasting system by reducing the computational overhead associated with trigonometric calculations. The primary change involves pre-calculating sine and cosine values for a range of angles used in the raycasting process. This eliminates the need to repeatedly compute these values during the main game loop, resulting in a significant performance improvement.
Additionally, the code includes a new set of unit tests to ensure the correctness and robustness of the raycasting functionality. These tests cover various aspects of the raycasting calculations, such as ray direction, wall collisions, ray length, wall hit angles, projected heights, and lighting colors. #2