Skip to content

Commit 9975558

Browse files
authored
Always return double when calculating rate (#57)
1 parent 9512223 commit 9975558

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/VariantVisitorRate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class VariantVisitorRate : public boost::static_visitor<boost::variant<int, std:
2626
/// \return calculated rate in Hz
2727
template<typename T>
2828
double operator()(const T& a, const T& b) const {
29-
return static_cast<double>((1000*(a - b)) / timestampCount);
29+
return (1000*(static_cast<double>(a) - b)) / timestampCount;
3030
}
3131

3232
/// If arguments have different type an exception is raised

0 commit comments

Comments
 (0)