Tweak dot generation again... it was too sparse in some cases.

This commit is contained in:
ClementTsang 2020-02-17 23:22:03 -05:00
parent 0724a40efb
commit 48d2afc54a

View file

@ -278,13 +278,13 @@ pub fn generate_joining_points(
// Let's generate... about this many points! // Let's generate... about this many points!
let num_points = std::cmp::min( let num_points = std::cmp::min(
std::cmp::max( std::cmp::max(
(value_difference.abs() / time_difference * 500.0) as u64, (value_difference.abs() / time_difference * 1000.0) as u64,
50, 50,
), ),
500, 1000,
); );
for itx in (0..num_points).step_by(2) { for itx in (0..num_points).step_by(4) {
points.push(( points.push((
time_difference - (itx as f64 / num_points as f64 * time_difference), time_difference - (itx as f64 / num_points as f64 * time_difference),
start_y + (itx as f64 / num_points as f64 * value_difference), start_y + (itx as f64 / num_points as f64 * value_difference),