Answers for "tetris rotate shape"

C
0

tetris rotate shape

# General formula for rotating around origin is
xNew = x * cos(a) - y * sin(a)
yNew = x * sin(a) + y * cos(a)

# For 90 degrees it becomes
xNew = -y
yNew = x
Posted by: Guest on July-29-2020

Code answers related to "C"

Browse Popular Code Answers by Language