Template Function helpme::formatNumber

Function Documentation

template<typename T, typename std::enable_if<std::is_floating_point<T>::value, int>::type = 0>
std::string helpme::formatNumber(const T &number, int width, int precision)

makes a string representation of a floating point number.

makes a string representation of a complex number.

Parameters:
  • width – the width used to display the number.

  • precision – the precision used to display the number.

  • width – the width used to display the real and the imaginary components.

  • precision – the precision used to display the real and the imaginary components.

Returns:

the string representation of the floating point number.

Returns:

the string representation of the complex number.