MCPcopy Create free account
hub / github.com/diasurgical/devilution / GetDistanceRanged

Function GetDistanceRanged

SourceX/controls/plrctrls.cpp:96–102  ·  view source on GitHub ↗

* @brief Get distance to coordinate * @param dx Tile coordinates * @param dy Tile coordinates */

Source from the content-addressed store, hash-verified

94 * @param dy Tile coordinates
95 */
96int GetDistanceRanged(int dx, int dy)
97{
98 int a = plr[myplr]._px - dx;
99 int b = plr[myplr]._py - dy;
100
101 return sqrt(a * a + b * b);
102}
103
104void FindItemOrObject()
105{

Callers 2

FindRangedTargetFunction · 0.85
CheckPlayerNearbyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected