Template Function brille::utils::my_cast

Function Documentation

template<typename T, typename R>
T brille::utils::my_cast(const R a)

special casting of floating point values to integer

effectively rounds doubles to their nearest integer not by truncating. So 0.6=>1 not 0.