I am working on making a div randomly move around a page.
This is a related question
Now, I have replaced the div with a picture like an "arrow" and I want it to randomly move while also pointing in the right direction by changing its rotation angle as it moves, instead of always pointing up.
I think I might need to rotate it at some angle while it moves, but I am unsure of how to calculate the angle between the old and new points.
Any help would be greatly appreciated!!!