Template Function TRAP::Math::RoundEven(genType)#

Function Documentation#

template<typename genType>
constexpr genType TRAP::Math::RoundEven(genType x)#

Find the nearest even integer to x.

A fractional part of 0.5 will round toward the nearest even integer. (Both 3.5 and 4.5 for x will return 4.0).

Parameters:

x – Specify the value to evaluate.

Returns:

Value equal to the nearest integer to x.