Define iszero in csv_stdout

This commit is contained in:
Ismael Gomez 2021-05-18 10:30:06 +02:00
parent 5a2a435710
commit 8414b2c2c9
1 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,12 @@ void metrics_stdout::toggle_print(bool b)
do_print = b;
}
// Define iszero() here since it's not defined in some platforms
static bool iszero(float x)
{
return fabsf(x) < 2 * DBL_EPSILON;
}
void metrics_stdout::set_metrics(const enb_metrics_t& metrics, const uint32_t period_usec)
{
if (!do_print || enb == nullptr) {