Skip to content

Commit

Permalink
realtime_impl: rint/rintf: use appropriate math function for float
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmueller authored and mbr0wn committed Apr 11, 2020
1 parent 44525cf commit bad1040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnuradio-runtime/lib/realtime_impl.cc
Expand Up @@ -42,7 +42,7 @@ static int rescale_virtual_pri(int virtual_pri, int min_real_pri, int max_real_p
float rmax = min_real_pri + (0.75 * (max_real_pri - min_real_pri));
float m = (rmax - rmin) / (rt_priority_max() - rt_priority_min());
float y = m * (virtual_pri - rt_priority_min()) + rmin;
int y_int = static_cast<int>(rint(y));
int y_int = static_cast<int>(rintf(y));
return std::max(min_real_pri, std::min(max_real_pri, y_int));
}

Expand Down

0 comments on commit bad1040

Please sign in to comment.