import torch


def per_face_normals(mesh : torch.Tensor):
    """Compute normals per face.

    Args:
        mesh (torch.Tensor): #F, 3, 3 array of vertices
    """

    vec_a = mesh[:, 0] - mesh[:, 1]
    vec_b = mesh[:, 1] - mesh[:, 2]
    normals = torch.cross(vec_a, vec_b)
    return normals