Refactored DistToStackCalculator.Calculate.