ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:length2d

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
functions:length2d [2017/03/15 21:25] korshunfunctions:length2d [2017/03/17 18:13] (current) – [Example] korshun
Line 1: Line 1:
 ====== length2d ====== ====== length2d ======
-{{tag>math vectors}}+{{tag>math vectors zandronum implemented_in_zdoom}}
 ''fixed length2d(fixed x, fixed y)'' ''fixed length2d(fixed x, fixed y)''
  
Line 19: Line 19:
 int y = GetActorY(tid2) - GetActorY(tid1); int y = GetActorY(tid2) - GetActorY(tid1);
 int distance = length2d(x, y), int distance = length2d(x, y),
-print(s:"The two actors are ", f:distance, s:" mapunits apart");+print(s:"The two actors are ", f:distance, s:" mapunits apart on the automap");
 </code> </code>
 +
 +<note tip>Use [[ActorDistance2D]] instead of the example code above.</note>
  
 ===== See also ===== ===== See also =====
functions/length2d.1489605933.txt.gz · Last modified: 2017/03/15 21:25 by korshun