diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/plotters-backend/src/rasterizer | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/plotters-backend/src/rasterizer')
-rw-r--r-- | vendor/plotters-backend/src/rasterizer/mod.rs | 2 | ||||
-rw-r--r-- | vendor/plotters-backend/src/rasterizer/path.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vendor/plotters-backend/src/rasterizer/mod.rs b/vendor/plotters-backend/src/rasterizer/mod.rs index d322391e3..b475acd24 100644 --- a/vendor/plotters-backend/src/rasterizer/mod.rs +++ b/vendor/plotters-backend/src/rasterizer/mod.rs @@ -10,7 +10,7 @@ // the question mark operator has a huge performance impact due to LLVM unable to handle it. // So the question is if this trick is still useful, or LLVM is smart enough to handle it since // then. -// +// // -- // Original comment: // diff --git a/vendor/plotters-backend/src/rasterizer/path.rs b/vendor/plotters-backend/src/rasterizer/path.rs index 35ae6049b..eae0bfe29 100644 --- a/vendor/plotters-backend/src/rasterizer/path.rs +++ b/vendor/plotters-backend/src/rasterizer/path.rs @@ -34,8 +34,8 @@ fn compute_polygon_vertex(triple: &[BackendCoord; 3], d: f64, buf: &mut Vec<Back f64::from(triple[1].1) + d * b_n.1, ); - // If they are actually the same point, then the 3 points are colinear, so just emit the point. - if a_p.0 as i32 == b_p.0 as i32 && a_p.1 as i32 == b_p.1 as i32 { + // Check if 3 points are colinear. If so, just emit the point. + if a_t.1 * b_t.0 == a_t.0 * b_t.1 { buf.push((a_p.0 as i32, a_p.1 as i32)); return; } |