function AITown::IsTownFurtherFromAthanFromB(town, tileA, tileB) {
	local a = AIMap.DistanceSquare(tileA, tileB)
	local b = AITown.GetDistanceSquareToTile(town, tileB)
	local c = AITown.GetDistanceSquareToTile(town, tileA)
	return c*c - b*b - a*a - a*b/2
}