# shz_roundf

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

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

```c
SHZ_INLINE float shz_roundf(float x) SHZ_NOEXCEPT;
```

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

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `x` | `float` |  |

## Returns

`float`

## Details

Returns the value of `x` rounded to the nearest integer, as a float.

## Warnings

- This routine only returns valid values for the input range -UINT32_MAX \<= `x` \<= UINT32_MAX.

## Availability

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