# shz_remquof

Source: https://sh4zam.com/api/scalar/shz_remquof/

> (Sorta) Replacement for the <math.h> routine, remquof()

```c
SHZ_INLINE float shz_remquof(float num, float denom, float* quot) SHZ_NOEXCEPT;
```

(Sorta) Replacement for the \<math.h> routine, remquof().

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `num` | `float` |  |
| `denom` | `float` |  |
| `quot` | `float *` |  |

## Returns

`float`

## Details

Returns the floating-point remainder of `num` divided by `denom`, rounded to the nearest integer (as a float). `quot` is set equal to the quotient which is used as part of the calculation.

## Notes

- `quot` is returning as a `float` rather than an `int` as with standard C. Simply cast to an `int` manually afterwards if that is the desired behavior.

## Warnings

- This routine does not gracefully handle dividing by zero.

## Availability

- **C++ equivalent:** [`shz::remquof`](https://sh4zam.com/api/cpp/#shzremquof)
- **Type-generic form:** none
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_scalar.h:154`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_scalar.h#L154)
- **Module:** [Scalar](https://sh4zam.com/api/scalar/), section "Rounding"

## See also

[`shz_remainderf`](https://sh4zam.com/api/scalar/shz_remainderf/)
