I've been working on a 3D engine in turbowarp for a bit now, and now I want to add sprite rotation. I experimented, and this is the formula I'll most likely be using. The background marker is kind of broken the higher the number you are using, but the formula itself is fine. For those wondering, sprite rotation is being used in games like doom (1993) to let 2d sprites look different from different angles.
If you're interested in the 3D engine itself, here you go: https://gamejolt.com/games/turbowarp-scratch-3d-engine/644741 I won't upload it to the scratch website, because it uses turbowarp exclusive features like mouse locking (and it would probably lag on normal scratch anyway).