I have a problem calculating the corners of a rotated rectangle.For the calculation I use a rotation matrix but there is somewhere a little mistake in my code.As you can see the corners have a wrong positions but were rotated correctly.Code:

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org