Skip to content
Snippets Groups Projects
helperFunctions.py 442 B
Newer Older
DarkLynx32's avatar
DarkLynx32 committed
"""Contains util functions that could be used anywhere in the project."""

IsolatedSushi's avatar
IsolatedSushi committed

DarkLynx32's avatar
DarkLynx32 committed
    """
    Parses a line to an object with a vector.

    :param line: The line that needs to be parsed, must contain a object followed by a numbers
    :type line: str
    :return: The object and its vector
    :rtype: (str, [float])
    """
IsolatedSushi's avatar
IsolatedSushi committed
    lineSplit = line.split(" ")
IsolatedSushi's avatar
IsolatedSushi committed
    return lineSplit[0], [float(elem) for elem in lineSplit[1:]]