mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-26 22:20:18 +00:00
Skip 2 points to reduce CPU load.
This commit is contained in:
parent
8e1c525e2a
commit
9b13ac1158
1 changed files with 2 additions and 2 deletions
|
@ -279,12 +279,12 @@ pub fn generate_joining_points(
|
|||
let num_points = std::cmp::min(
|
||||
std::cmp::max(
|
||||
(value_difference.abs() / time_difference * 500.0) as u64,
|
||||
100,
|
||||
50,
|
||||
),
|
||||
500,
|
||||
);
|
||||
|
||||
for itx in 0..num_points {
|
||||
for itx in (0..num_points).step_by(2) {
|
||||
points.push((
|
||||
time_difference - (itx as f64 / num_points as f64 * time_difference),
|
||||
start_y + (itx as f64 / num_points as f64 * value_difference),
|
||||
|
|
Loading…
Reference in a new issue