Angle
Category: Arithmetics
Since engine version: 4.6.5.0 CP (extended in 4.9.5.0 CE)
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 iX1, int iY1, int iX2, int iY2, int iPrec);
Parameters
- iX1:
-
X coordinate of the first point
- iY1:
-
Y coordinate of the first point
- iX2:
-
X coordinate of the second point
- iY2:
-
Y coordinate of the second point
- iPrec:
-
[optional] 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.
Example
jwk, April 2002
Clonk-Karl, September 2004