atlinter.utils module

Module for utility functions.

atlinter.utils.find_closest(x: float, values: list[int]) tuple[int, float][source]

Find closest element to a given element in a list and its position.

Parameters:
  • x – Value to compare with values list.

  • values – List of values where to find closest element to x and its position.

Returns:

  • int – Indice of the closest element to x in the values list.

  • float – Closest value to x in the values list.