Template Function TRAP::Math::Step(genType, genType)#

Function Documentation#

template<typename genType>
constexpr genType TRAP::Math::Step(genType edge, genType x)#

Generate a step function by comparing x to edgee.

Parameters:
  • edge – Specifies the location of the edge of the step function.

  • x – Specify the value to be used to generate the step function.

Returns:

0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.