JeVoisBase  1.20
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
round_helper< dst_type, src_type, need_rounding > Struct Template Reference

Helper struct to handle rounding between different types. More...

#include <jevoisbase/Components/RoadFinder/Promotions.H>

Detailed Description

template<class dst_type, class src_type, bool need_rounding = (std::numeric_limits<dst_type>::is_integer && !std::numeric_limits<src_type>::is_integer)>
struct round_helper< dst_type, src_type, need_rounding >

Helper struct to handle rounding between different types.

Note that we aren't worried about clamping here, that is handled separately by convert_helper (see below). We have different specializations of round_helper depending on whether the src and dest types are integral or floating-point. The only case where we have to do any actual rounding is when we're going from floating->integral.

Definition at line 220 of file Promotions.H.


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