Skip to content

Commit

Permalink
Use <= EPSILON
Browse files Browse the repository at this point in the history
This seems to be the more common use.
  • Loading branch information
alexheretic committed Apr 13, 2020
1 parent c668c61 commit c081567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rasterizer/src/raster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Rasterizer {
/// rasterizer.draw_line(point(0.0, 0.48), point(1.22, 0.48));
/// ```
pub fn draw_line(&mut self, p0: Point, p1: Point) {
if (p0.y - p1.y).abs() < core::f32::EPSILON {
if (p0.y - p1.y).abs() <= core::f32::EPSILON {
return;
}
let (dir, p0, p1) = if p0.y < p1.y {
Expand Down

0 comments on commit c081567

Please sign in to comment.