This isn't actually the data that callers usually want. Most of the callers just want the bounds. The heading and length are trivially computed from that. Add a class to contain the result so it's easier to refactor.