compute offsets when axes are on the same side