import math


def get_angle_between_yaw_and_point(a, p, yaw):
    """
    Gets the angle between the point p and the vector starting from a's centroid with the given yaw angle.
    """
    p_yaw = [math.cos(math.radians(yaw)), math.sin(math.radians(yaw))]
    p_self = [p[0] - a.centroid.x, p[1] - a.centroid.y]
    angle = math.degrees(math.atan2(*p_yaw) - math.atan2(*p_self)) % 360
    return angle