Template Function otyca::tanh_clamp

Function Documentation

template<typename T>
T otyca::tanh_clamp(T x, T a, T b)

Computes a clamped hyperbolic tangent function between a and b.

Template Parameters:

T – The numeric type.

Parameters:
  • x – The input value.

  • a – The lower bound.

  • b – The upper bound.

Returns:

The clamped hyperbolic tangent function output.