Category: Arithmetics
Since engine version: 1.0 OC
Angle
Description
Returns the view angle from the first point to the second in degrees. 0° ist straight up. All coordinates global.
Syntax
int Angle(int x1, int y1, int x2, int y2, int precision);
Parameters
- x1:
- X coordinate of the first point
- y1:
- Y coordinate of the first point
- x2:
- X coordinate of the second point
- y2:
- Y coordinate of the second point
- precision:
- [opt] Multiplied with the angle. For a higher precision while working with integers (whole numbers) you can specify a higher precision value. A precision of 10 will produce values from 0 to 3600.