Game Design - Move Sprite at Angle/Direction

I got to help a student figure out how to make a spaceship move forward in the direction it’s facing (based on angle). Here’s what we came up with (borrowed/edited from some Javascript tutorials):



What a great resource. Nice job and thank you for sharing!