summaryrefslogtreecommitdiffstats
path: root/vendor/plotters-backend/src/rasterizer
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plotters-backend/src/rasterizer')
-rw-r--r--vendor/plotters-backend/src/rasterizer/mod.rs2
-rw-r--r--vendor/plotters-backend/src/rasterizer/path.rs4
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;
}