Template Function TRAP::Math::Modf(genType, genType&)#

Function Documentation#

template<typename genType>
genType TRAP::Math::Modf(genType x, genType &i)#

Separate a value into its integer and fractional components.

Both the return value and the output parameter will have the same sign as x.

Parameters:
  • x – Specify the value to separate.

  • i – Out variable that receives the integer part of the argument.

Returns:

Fractional part of x and sets i to the integer part (as a whole number floating point value).