2018/08.py
def rot(
    x: float, y: float, deg: float, origin: Tuple[float, float] = (0, 0)
) -> Tuple[float, float]:
    """
    Rotate a point by `deg` around the `origin`. This does floating-point math, so
    you may encounter precision errors.
    """
    theta = deg * math.pi / 180
    x2 = (x - origin[0]) * math.cos(theta) - (y - origin[1]) * math.sin(theta)
    y2 = (x - origin[0]) * math.sin(theta) + (y - origin[1]) * math.cos(theta)
    return (x2 + origin[0], y2 + origin[1])

    Rotate a point by `deg` around the `origin`. This does floating-point math, so
    you may encounter precision errors.
    
Rotate a point by `deg` around the `origin`. This does floating-point math, so
you may encounter precision errors.
Rotate a point by ` deg ` around the ` origin ` . This does floating - point math so you may encounter precision errors .
def rot(
    x: float, y: float, deg: float, origin: Tuple[float, float] = (0, 0)
) -> Tuple[float, float]:
    theta = deg * math.pi / 180
    x2 = (x - origin[0]) * math.cos(theta) - (y - origin[1]) * math.sin(theta)
    y2 = (x - origin[0]) * math.sin(theta) + (y - origin[1]) * math.cos(theta)
    return (x2 + origin[0], y2 + origin[1])
def rot ( x : float , y : float , deg : float , origin : Tuple [ float , float ] = ( 0 , 0 ) ) -> Tuple [ float , float ] : theta = deg * math . pi / 180 x2 = ( x - origin [ 0 ] ) * math . cos ( theta ) - ( y - origin [ 1 ] ) * math . sin ( theta ) y2 = ( x - origin [ 0 ] ) * math . sin ( theta ) + ( y - origin [ 1 ] ) * math . cos ( theta ) return ( x2 + origin [ 0 ] , y2 + origin [ 1 ] )
Rotate a point by `deg` around the `origin`.
Rotate a point by ` deg ` around the ` origin ` .
"""
    Rotate a point by `deg` around the `origin`. This does floating-point math, so
    you may encounter precision errors.
    """
x
float
y
float
deg
float
origin
Tuple[float, float]