# tfg.math.math_helpers.factorial

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/graphics/blob/master/tensorflow_graphics/math/math_helpers.py#L104-L118) |

Computes the factorial of `n`.

    tfg.math.math_helpers.factorial(
        n: TensorLike
    ) -> TensorLike

<br />

<br />

<br />

| ## Note ||
|---|---|
| In the following, A1 to An are optional batch dimensions. ||

<br />

<br />

<br />

<br />

| ## Args ||
|---|---|
| `n` | A tensor of shape `[A1, ..., An]`. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor of shape `[A1, ..., An]`. ||

<br />