I still have a problem with my rotation function.
I rewrote the rotation function because the previous one didn't work as I wanted.
Now if I rotate a line in a 2D space, if I give it fixed values linke this:
line(400,400,rotate(1,400,400,400,600,Ub2),rotate(2,400,400,400,600,Ub2));
...it...