def rotate_layer(layer: tuple, rotation_diff: int) -> tuple:
    """Rotate layer by given rotation angle"""

    _, _, rotation, distribution = layer

    new_rotation = rotation + rotation_diff
    new_rotation = new_rotation % 180 if distribution == "Normal" else new_rotation % 360
    
    new_layer = list(layer)
    new_layer[2] = new_rotation

    return tuple(new_layer)