Into

Modules

Documentation

classPii::ToFloatingPoint

#include <PiiTypeTraits.h>

Converts a type to a corresponding floating-point type.

Description

The Type member of this structure is float for all primitive types except double and long double, for which no conversion will be made. Composed types such as PiiMatrix should specialize this structure:

 namespace Pii
 {
   template <class T> struct ToFloatingPoint<PiiMatrix<T> >
   {
     typedef PiiMatrix<typename ToFloatingPoint<T>::Type> Type;
     typedef typename ToFloatingPoint<T>::Type PrimitiveType;
   };
 }

Public types

typedef float

Primitive types are primitive, so the PrimitiveType equals Type.

typedef float

Primitive types are converted to floats by default.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.