Digital gamma-ray tracking algorithms in segmented germanium detectors