Static Public Member Functions | List of all members
visionary::NumericCast< TTrg, TSrc > Struct Template Reference

#include <NumericConv.h>

Static Public Member Functions

static TTrg clamped (const TSrc &src)
 

Detailed Description

template<typename TTrg, typename TSrc>
struct visionary::NumericCast< TTrg, TSrc >

Template to cast from a source numeric to a destination type

Template Parameters
TTrgcast target type
TSrccast source type

Definition at line 94 of file NumericConv.h.

Member Function Documentation

◆ clamped()

template<typename TTrg , typename TSrc >
static TTrg visionary::NumericCast< TTrg, TSrc >::clamped ( const TSrc &  src)
inlinestatic

Cast from source to target type values outside the destination types range will be clamped to lie within the target types value range.

Parameters
[in]srcvalue to be casted
Returns
src valeus casted to the target type and clamped to the target types value range

Definition at line 101 of file NumericConv.h.


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


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 04:38:18