T-SIMD v31.1.0
A C++ template SIMD library
Loading...
Searching...
No Matches
simd::Decimal< T > Struct Template Reference

Class for formatting SIMD types as decimal numbers. More...

Detailed Description

template<typename T>
struct simd::Decimal< T >

Class for formatting SIMD types as decimal numbers.

Template Parameters
Ttype to format

Public Member Functions

 Decimal (T value, int fieldWidth=-1, int precision=-1)
 Constructor.
 

Public Attributes

char str [256]
 The formatted string.
 

Constructor & Destructor Documentation

◆ Decimal()

template<typename T >
simd::Decimal< T >::Decimal ( T value,
int fieldWidth = -1,
int precision = -1 )
inline

Constructor.

Parameters
valuevalue to format
fieldWidthfield width (e.g. 4 for "%4d")
precisionprecision (e.g. 2 for "%.2f")