MicrOS
lroundf.c File Reference
#include "../math.h"

Functions

long int lroundf (float x)
 Round to nearest and cast to long integer. More...
 

Function Documentation

◆ lroundf()

long int lroundf ( float  x)

Round to nearest and cast to long integer.

The lround and llround functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.

Parameters
xValue to round.
Returns
The lround and llround functions return the rounded integer value.