I have two coordinates $(x, y)$ lets call this point $A$. The triangle is drawn between point $B$, $C$ and $D$ which have the following values
$B = (A_x - 5, A_y)$
$C = (A_x + 5, A_y)$
$D = (A_x, A_y + 25)$
I also have a variable $R$ which stands for rotation, it will be from $0-180$ or $0-360$ whichever you prefer to work with.
How do I rotate the triangle $\triangle BCD$ a degree of $R$ ?
Edit:
My current attempt to create something like this, looks like this
sinr = sin(R*3.14/180.0)
cosr = cos(R*3.14/180.0)
B = int((x + 5)*cosr - y*sinr), int((x + 5)*sinr + y*cosr)
C = int((x - 5)*cosr - y*sinr), int((x - 5)*sinr + y*cosr)
D = int(x*cosr - (y - 25)*sinr), int(x*sinr + (y - 25)*cosr)
However it leads to the following: link
Note: the $X$ and $ Y $ value does not change in this example