Template Function TRAP::Math::RoundEven(Vec<L, T>)#

Function Documentation#

template<u32 L, typename T>
constexpr Vec<L, T> TRAP::Math::RoundEven(Vec<L, T> 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.