signals-cpp
Loading...
Searching...
No Matches
Utils.h
Go to the documentation of this file.
1
#pragma once
2
#include <algorithm>
3
4
namespace
signal_utils
5
{
10
inline
bool
11
getTimeDelta
(
double
& dt,
const
double
& t0,
const
double
& tf,
const
double
& dt_max = std::numeric_limits<double>::max())
12
{
13
if
(t0 >= tf || t0 < 0)
14
{
15
return
false
;
16
}
17
dt = std::min(tf - t0, dt_max);
18
return
true
;
19
}
20
21
}
// end namespace signal_utils
signal_utils
Definition
Utils.h:5
signal_utils::getTimeDelta
bool getTimeDelta(double &dt, const double &t0, const double &tf, const double &dt_max=std::numeric_limits< double >::max())
Definition
Utils.h:11
include
signals
Utils.h
Generated by
1.13.2