mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 23:13:43 +00:00
CSV export + DFT math operation
This commit is contained in:
parent
79a990af47
commit
6e55eb02dd
27 changed files with 935 additions and 52 deletions
|
|
@ -627,6 +627,10 @@ int Trace::index(double x)
|
|||
auto lower = lower_bound(lastMath->rData().begin(), lastMath->rData().end(), x, [](const Data &lhs, const double x) -> bool {
|
||||
return lhs.x < x;
|
||||
});
|
||||
if(lower == lastMath->rData().end()) {
|
||||
// actually beyond the last sample, return the index of the last anyway to avoid access past data
|
||||
return lastMath->rData().size() - 1;
|
||||
}
|
||||
return lower - lastMath->rData().begin();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue