DWITE Online Computer Programming Contest, November 2009, Problem 1
Angles are a vital part of game physics, and are relevant to velocities, collisions, and other interactions between objects. As such, it's important to be able to accurately calculate angles between points.
The input will contain 5 lines, each containing two points,
It is guaranteed that both points will not be at
The output will contain 5 lines, each a corresponding angle between the points through the origin, rounded to the nearest .0
.
Sample Input
Copy
71 71 100 0
100 0 71 71
0 100 0 -100
-100 0 0 -100
Sample Output
Copy
45.0
315.0
180.0
270.0
Problem Resource: DWITE
Comments