nint2

 

Description

Return the closest int to the double argument.

The arithmetic is same with Excel, but not same with c/c++.

Syntax

int nint2( double x )

Parameters

x
[input] double value the nearest integer to which is sought.

Return

the nearest integer to x

Examples

EX1

void nint2_ex1()
{
        out_int("", nint2(-0.5)); // -1
}

Remark

See Also

nint

header to Include

origin.h

Reference