import math


def rounded_bez(angle):
    """
        From https://math.stackexchange.com/questions/1671588/b%C3%A9zier-curve-approximation-of-a-circular-arc.
        The control points of a cubic Bezier curve for approximating a circular arc with end points
        P0, P1, radius R, and angular span A:
                P0, P0+R*L*T0, P1-R*L*T1, P1
        where T0 and T1 are the unit tangent vector of the circular arc at P0 and P1
        and L = 4/3*tan(A/4)

        :param angle:
        :return:
    """
    return 4/3 * math.tan(math.radians(angle/4))