import math


def direction_to_point(current_point, target_point):
    """ Function to determine the direction between the current point and the
    target point.

    Keyword arguments:
    current_point -- An array with coordinates of the current point
    target_point -- An array with coordinates of the target point

    Returns:
    This function returns an angle in degrees
    """
    a = math.radians(current_point[0])
    b = math.radians(target_point[0])
    d = math.radians(target_point[1] - current_point[1])

    y = math.sin(d) * math.cos(b)
    x = math.cos(a) * math.sin(b) - math.sin(a) * math.cos(b) * math.cos(d)


    return (math.degrees(math.atan2(y, x)) + 360) % 360