1#ifndef SENSESP_TRANSFORMS_TYPECAST_H_
2#define SENSESP_TRANSFORMS_TYPECAST_H_
33template <
typename IN,
typename OUT>
36 Typecast(std::function<OUT(IN)> cast = [](IN input) -> OUT {
37 return static_cast<OUT
>(input);
Takes as its input a float, rounds it to the nearest whole number, then outputs it as an int.
Converts input from one data type to another, then outputs the new type.
Typecast(std::function< OUT(IN)> cast=[](IN input) -> OUT { return static_cast< OUT >(input);})
Typecast< int, float > IntToFloat
Typecast< float, int > FloatToInt
Typecast< bool, int > BoolToInt
Typecast< int, bool > IntToBool