Devilution
Diablo devolved - magic behind the 1996 computer game

◆ GetDirection()

int GetDirection ( int  x1,
int  y1,
int  x2,
int  y2 
)

Calculate the best fit direction between two points.

Parameters
x1Tile coordinate
y1Tile coordinate
x2Tile coordinate
y2Tile coordinate
Returns
A value from the direction enum

Definition at line 683 of file engine.cpp.