Skip to content

Commit

Permalink
Always return double when calculating rate (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
awegrzyn authored Jun 12, 2018
1 parent 9512223 commit 9975558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VariantVisitorRate.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class VariantVisitorRate : public boost::static_visitor<boost::variant<int, std:
/// \return calculated rate in Hz
template<typename T>
double operator()(const T& a, const T& b) const {
return static_cast<double>((1000*(a - b)) / timestampCount);
return (1000*(static_cast<double>(a) - b)) / timestampCount;
}

/// If arguments have different type an exception is raised
Expand Down

0 comments on commit 9975558

Please sign in to comment.