Template Function librapid::copySign(const T&, const M&)#

Function Documentation#

template<typename T, typename M>
T librapid::copySign(const T &mag, const M &sign) noexcept#

Create a new number with a given magnitude and sign

Template Parameters
  • T – The type of the magnitude

  • M – The type of the sign

Parameters
  • mag – The magnitude of the number

  • sign – The value from which to copy the sign

Returns