Template Function husarion_ugv_utils::common_utilities::CountPercentage

Function Documentation

template<typename T>
float husarion_ugv_utils::common_utilities::CountPercentage(const T &value, const T &total)

Counts the percentage of a value in relation to a total. Result is returned as two digit precision float.

Parameters:
  • value – The share value.

  • total – The total value.

Returns:

The percentage value.