Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/accelerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ void Accelerator::update_time_aware_info(void) const {
}
}

if (this->time_aware_indices.size() > 0) {
time_aware_displacements[0] += s_pos;
}
if (this->time_aware_indices.size() == 0) return;

time_aware_displacements[0] += s_pos;

//? NOTE : The diference between "line_length" and the sum of "time_aware_displacements" (cum_length) is on the order of
//? 1e-15 ~ 1e-16. The propagation of this tiny error affects the tracking. The following lines avoid losing precision.
double cum_length = std::accumulate(time_aware_displacements.begin(), time_aware_displacements.end(), 0.0);
Expand Down
Loading