import math


def get_lineload_mod(distance, height, angle):
    """
    Calculates required modification of the position for the line load.
    :param distance: wanted distance between beam and line load glyph (double)
    :param height: height of the line load (double)
    :param angle: angle between the two nodes the line load is connected to (double)
    :return: needed x and y modification for x and y of the center between the two nodes (double)
    """
    x_mod = - (distance + height / 2) * math.sin(angle)
    y_mod = (distance + height / 2) * math.cos(angle)
    return x_mod, y_mod