Closed SpaceNinjaApe closed 4 months ago
Hi, @SpaceNinjaApe , Sorry, but you are missing two points: 1) Angle is in radians 2) Y-axis oriented upwards So, if you rotate segment by angle Math.PI/2 (positive angle rotates counter clockwise), the result will be something like:
l1 = l1.rotate(Math.PI/2)
start : -1.2246467991473532e-14, -200
Best, Alex
Thanks for the Reply @alexbol99 , okay i didnt now about the radians
But shouldnt l1.rotate(Math.PI)
result in the exact same oposite Position ?
Theres always a slight difference to what i expect. Probably due to the nature of PI? How to deal with this? Round / Floor?
Float calculations always end with small inaccuracy. You should use rounding
Alright Thanks! keep up the good work lad!
Following code
Gives me following output:
I would expect:
Am i missing something? Even with specifying the center for Rotation, it still gives me unexpected outputs.