def get_trailing(xs, x_end):
	""" 
	if x_end is larger than xs
	return x_start (the end of xs facing x_end) and trailing (bool) indicating whether x_end > xs
	complains if x_end is within xs
	"""
	if x_end > max(xs):
		x_start = max(xs)
		trailing = True

	elif x_end < min(xs):
		x_start = min(xs)
		trailing = False
	else:
		raise Exception("[extrap] x_end within xs")

	return x_start, trailing