toEnumVector n =
  let (y, x) = n `quotRem` (2 ^ maxLevelDimExponent)
      (vx, vy) | x > maxVectorDim = (x - 2 ^ maxLevelDimExponent, y + 1)
               | x < - maxVectorDim = (x + 2 ^ maxLevelDimExponent, y - 1)
               | otherwise = (x, y)
  in Vector{..}
toEnumVector n =
  let (y, x) = n `quotRem` (2 ^ maxLevelDimExponent)
      (vx, vy) | x > maxVectorDim = (x - 2 ^ maxLevelDimExponent, y + 1)
               | x < - maxVectorDim = (x + 2 ^ maxLevelDimExponent, y - 1)
               | otherwise = (x, y)
  in Vector{..}
toEnumVector n =
  let (y, x) = n `quotRem` (2 ^ maxLevelDimExponent)
      (vx, vy) | x > maxVectorDim = (x - 2 ^ maxLevelDimExponent, y + 1)
               | x < - maxVectorDim = (x + 2 ^ maxLevelDimExponent, y - 1)
               | otherwise = (x, y)
  in Vector{..}