docs: def _calcOnAxisFactor(self, aLocation, deltaAxis, deltasOnSameAxis, deltaLocation):
          """
              Calculate the on-axis factors.
          """
          if deltaAxis == "origin":
              f = 0
              v = 0
          else:
              f = aLocation[deltaAxis]
              v = deltaLocation[deltaAxis]
          i = []
          iv = {}
          for value in deltasOnSameAxis:
              iv[Location(value)[deltaAxis]]=1
          i = sorted(iv.keys())
          r = 0
          B, M, A = [], [], []
          mA, mB, mM = None, None, None
          for value in i:
              if value < f: B.append(value)
              elif value > f: A.append(value)
              else: M.append(value)
          if len(B) > 0:
              mB = max(B)
              B.sort()
          if len(A) > 0:
              mA = min(A)
              A.sort()
          if len(M) > 0:
              mM = min(M)
              M.sort()
          if mM is not None:
              if ((f-_EPSILON <  v) and (f+_EPSILON > v)) or f==v: r = 1
              else: r = 0
          elif mB is not None and mA is not None:
              if v < mB or v > mA: r = 0
              else:
                  if v == mA:
                      r = float(f-mB)/(mA-mB)
                  else:
                      r = float(f-mA)/(mB-mA)
          elif mB is None and mA is not None:
              if v==A[1]:
                  r = float(f-A[0])/(A[1]-A[0])
              elif v == A[0]:
                  r = float(f-A[1])/(A[0]-A[1])
              else:
                  r = 0
          elif  mB is not None and mA is None:
              if v == B[-2]:
                  r = float(f-B[-1])/(B[-2]-B[-1])
              elif v == mB:
                  r = float(f-B[-2])/(B[-1]-B[-2])
              else:
                  r = 0
          return r