import math

import numpy as np


DEG_TO_RADS = math.pi / 180


def T1(angle, degrees=False):
    angle = angle * DEG_TO_RADS if degrees else angle

    return np.array([
        [1, 0, 0],
        [0, math.cos(angle), math.sin(angle)],
        [0, -math.sin(angle), math.cos(angle)],
    ])


def T2(angle, degrees=False):
    angle = angle * DEG_TO_RADS if degrees else angle

    return np.array([
        [math.cos(angle), 0, -math.sin(angle)],
        [0, 1, 0],
        [math.sin(angle), 0, math.cos(angle)]
    ])


def T3(angle, degrees=False):
    angle = angle * DEG_TO_RADS if degrees else angle

    return np.array([
        [math.cos(angle), math.sin(angle), 0],
        [-math.sin(angle), math.cos(angle), 0],
        [0, 0, 1]
    ])