VTK  9.2.6
vtkNumberToString Class Reference

Convert floating and fixed point numbers to strings. More...

#include <vtkNumberToString.h>

Classes

struct  TagDouble
struct  TagFloat

Public Member Functions

template<typename T>
const T & operator() (const T &val) const
const TagDouble operator() (const double &val) const
const TagFloat operator() (const float &val) const

Detailed Description

Convert floating and fixed point numbers to strings.

This class uses the double-conversion library to convert floating point and fixed point numbers to ASCII versions that are represented without numerical precision errors.

Typical use:

float a = 1.0f/3.0f;
std::cout << convert(a) << std::endl;
Convert floating and fixed point numbers to strings.
Tests:
vtkNumberToString (Tests)

Definition at line 44 of file vtkNumberToString.h.

Member Function Documentation

◆ operator()() [1/3]

template<typename T>
const T & vtkNumberToString::operator() ( const T & val) const
inline

Definition at line 66 of file vtkNumberToString.h.

◆ operator()() [2/3]

const TagDouble vtkNumberToString::operator() ( const double & val) const
inline

Definition at line 70 of file vtkNumberToString.h.

◆ operator()() [3/3]

const TagFloat vtkNumberToString::operator() ( const float & val) const
inline

Definition at line 71 of file vtkNumberToString.h.


The documentation for this class was generated from the following file: