Based on
Pikuma's Raycaster in C
course.