import torch
import math


def affine_transformation_rotation2d(angle_radian: float) -> torch.Tensor:
    """
    Defines a 2D rotation transform
    Args:
        angle_radian: the rotation angle in radian

    Returns:
        a 3x3 transformation matrix
    """

    rotation = torch.tensor([
        [math.cos(angle_radian), math.sin(angle_radian), 0],
        [-math.sin(angle_radian), math.cos(angle_radian), 0],
        [0, 0, 1]
    ], dtype=torch.float32)
    return rotation