VTK  9.1.0
Classes | Public Member Functions | List of all members
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.
OSPFrameBufferFormat convert(RTWFrameBufferFormat format)
Definition: OSPRayBackend.h:17

Definition at line 41 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 63 of file vtkNumberToString.h.

◆ operator()() [2/3]

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

Definition at line 67 of file vtkNumberToString.h.

◆ operator()() [3/3]

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

Definition at line 68 of file vtkNumberToString.h.


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