def diagonal(a: tuple, b: tuple):
    """
	Diagonal distance
	On a square grid that allows 8 directions of movement.

	:param a: tuple  Start node position
	:param b: tuple  End node position
	:return: float
	"""
    ax, ay, bx, by = a[0], a[1], b[0], b[1]
    dx = abs(ax - bx)
    dy = abs(ay - by)
    return (dx + dy) * min(dx, dy)
