import math


def svg_angle(angle):
    """Convert SVG angle to radians"""
    angle = angle.strip()
    if angle.endswith("deg"):
        return float(angle[:-3]) * math.pi / 180
    elif angle.endswith("rad"):
        return float(angle[:-3])
    return float(angle) * math.pi / 180