2010-08-22 13:13:17 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< !DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
2009-05-09 13:11:51 +00:00
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs >
<func >
<title > Angle</title>
2010-08-22 13:13:17 +00:00
<category > Arithmetics</category>
2011-06-30 10:52:55 +00:00
<version > 5.1 OC</version>
2009-05-09 13:11:51 +00:00
<syntax >
<rtype > int</rtype>
<params >
2010-08-22 13:13:17 +00:00
<param >
<type > int</type>
<name > x1</name>
<desc > X coordinate of the first point</desc>
</param>
<param >
<type > int</type>
<name > y1</name>
<desc > Y coordinate of the first point</desc>
</param>
<param >
<type > int</type>
<name > x2</name>
<desc > X coordinate of the second point</desc>
</param>
<param >
<type > int</type>
<name > y2</name>
<desc > Y coordinate of the second point</desc>
</param>
<param >
<type > int</type>
<name > precision</name>
<desc > 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.</desc>
<optional />
</param>
2009-05-09 13:11:51 +00:00
</params>
</syntax>
2010-08-22 13:13:17 +00:00
<desc > Returns the view angle from the first point to the second in degrees. 0° ist straight up. All coordinates global.</desc>
2009-05-09 13:11:51 +00:00
<examples >
<example >
2010-08-22 13:13:17 +00:00
<code > <funclink > SetR</funclink> (Angle(<funclink > GetX</funclink> (<funclink > GetCursor</funclink> (0)), <funclink > GetY</funclink> (<funclink > GetCursor</funclink> (0)),
2009-05-09 13:11:51 +00:00
<funclink > GetX</funclink> (<funclink > GetCursor</funclink> (1)), <funclink > GetY</funclink> (<funclink > GetCursor</funclink> (1)) ));</code>
2010-08-22 13:13:17 +00:00
<text > The object rotates so it points from the clonk of player 1 to the clonk of player 2.</text>
2009-05-09 13:11:51 +00:00
</example>
</examples>
<related >
<funclink > Cos</funclink>
<funclink > Sin</funclink>
</related>
</func>
2010-08-22 13:13:17 +00:00
<author > jwk</author> <date > 2002-04</date>
<author > Clonk-Karl</author> <date > 2004-09</date>
2009-05-09 13:11:51 +00:00
</funcs>