# shz_xmtrx_invert_rigid

Source: https://sh4zam.com/api/xmtrx/shz_xmtrx_invert_rigid/

```c
SHZ_INLINE void shz_xmtrx_invert_rigid(void) SHZ_NOEXCEPT;
```

Inverts the rigid transform held within XMTRX in-place.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `` | `void` |  |

## Returns

Nothing (`void`).

## Details

XMTRX must hold a rigid affine transform \[R t; 0 1\], where R is orthonormal. The result, \[transpose(R), -transpose(R) \* t; 0 1\], is computed by transposing R rather than by a general inversion, making this far cheaper than `shz_xmtrx_invert()`.

## Warnings

- Scale, shear, and projective matrices are not inverted correctly. Use `shz_xmtrx_invert()` for those.

## Availability

- **C++ equivalent:** [`shz::xmtrx::invert_rigid`](https://sh4zam.com/api/cpp/xmtrx/#invert_rigid)
- **Type-generic form:** none
- **Back-ends:** SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_xmtrx.h:1250`](https://github.com/gyrovorbis/sh4zam/blob/6b22b851ad9ca109049f956dbbbecf7c519c959f/include/sh4zam/shz_xmtrx.h#L1250)
- **Module:** [XMTRX](https://sh4zam.com/api/xmtrx/), section "Miscellaneous"

## See also

[`shz_xmtrx_invert`](https://sh4zam.com/api/xmtrx/shz_xmtrx_invert/)
