2xDSoft - Works every 2nd time!

Get the angle of a line

Get the angle of a line
Size: 10 KB


I made a small script, which returns 4 angles of a line related to a horizontal or vertical axxis. This can be useful, for example, if you have to draw a background or a sprite with rotation (race games with sideview).

r1 = get_rotation_of_line(x1,y1,x2,y2) //Closed V angle
r2 = 180-r1 //Open V angle
r3 = 90-r1 //Closed H angle
r4 = 180-r3 //Open H angle


Download


 
We have a total of 271264 visitors (679197 hits) !
=> Do you also want a homepage for free? Then click here! <=
"