I am trying to make a raycaster game in Javascript, and to do so, I am following this tutorial, which is written in C++.
My problem stems from trying to convert the following two lines to javascript:
int tx = (int)(texWidth * (floorX - cellX)) & (texWidth - 1);
color = (color >> 1) & 8355711; // make a bit darker
I don't know what the "&" and ">>" mean in those two lines. Is there an equivalent in Javascript?