# shz_quat_magnitude_fsrra

Source: https://sh4zam.com/api/quat/shz_quat_magnitude_fsrra/

```c
SHZ_INLINE float shz_quat_magnitude_fsrra(shz_quat_t quat) SHZ_NOEXCEPT;
```

Returns the magnitude of the given quaternion, unsafely, using FSRRA.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `quat` | `shz_quat_t` | The quaternion whose magnitude is returned. |

## Returns

The magnitude of `quat`.

## Details

Faster alternative to `shz_quat_magnitude()` which does not check for a zero-length quaternion.

## Warnings

- Results in a division-by-zero when `quat` has a magnitude of `0.0f`.

## Naming and requirements

- `_fsrra`: Uses `FSRRA` (fast approximate 1/sqrt(x)). The argument or denominator must be positive. Faster, less precise. ([Naming and Suffixes](https://sh4zam.com/concepts/naming-and-suffixes/))

## Availability

- **C++ equivalent:** [`shz::quat::magnitude_fsrra`](https://sh4zam.com/api/cpp/quat/#magnitude_fsrra)
- **Type-generic form:** none
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_quat.h:273`](https://github.com/gyrovorbis/sh4zam/blob/6b22b851ad9ca109049f956dbbbecf7c519c959f/include/sh4zam/shz_quat.h#L273)
- **Module:** [Quaternion](https://sh4zam.com/api/quat/), section "Properties"

## See also

[`shz_quat_magnitude`](https://sh4zam.com/api/quat/shz_quat_magnitude/)
