Added a center function which obtains the 1d center of an origin and a length.

It is fully documented!