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

Function Documentation#

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

Find the nearest integer of x.

The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest. This includes the possibility that Round(x) returns the same value as RoundEven(x) for all values of x.

Parameters:

x – Specify the value to evaluate.

Returns:

Value equal to the nearest integer to x.