Get radial distance between vector1 and vector2
There is a typo in the y components, both times only entity2 is used. I believe that is a copy-paste error.

Your distance is better known as the manhattan distance. I suggest naming the method after it to avoid surprises.

An other method of getting it uses the absolute value of the differences:

int get_manhattan_dist (coord entity1, coord entity2)
{
    return abs(entity1.X - entity2.X) + abs(entity1.Y - entity2.Y);
}


Of course if you have the manhattan distance you can easily provide the euclidean distance

double get_euclid_dist (coord entity1, coord entity2)
{
    double diffX    = entity1.X - entity2.X;
    double diffY    = entity1.Y - entity2.Y;

    return hypot(diffX, diffY);
}