From c2453971787d5933d7600f2fcc86c905e5aacca5 Mon Sep 17 00:00:00 2001 From: slime Date: Sun, 30 Oct 2022 12:30:42 -0300 Subject: [PATCH] Remove NaN-check C assert calls in line drawing code. Users can pass NaN point values into line drawing code. love shouldn't abort the entire program if that happens. --- src/modules/graphics/Polyline.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/modules/graphics/Polyline.cpp b/src/modules/graphics/Polyline.cpp index f3dd603f2..d5184823d 100644 --- a/src/modules/graphics/Polyline.cpp +++ b/src/modules/graphics/Polyline.cpp @@ -24,7 +24,6 @@ // C++ #include -#include // treat adjacent segments with angles between their directions <5 degree as straight static const float LINES_PARALLEL_EPS = 0.05f; @@ -192,7 +191,6 @@ void MiterJoinPolyline::renderEdge(std::vector &anchors, std::vector 0) { // lines parallel, compute as u1 = q + ns * w/2, u2 = q - ns * w/2 - assert(ns == ns); //NaN check normals.push_back(ns); normals.push_back(-ns); } @@ -201,7 +199,6 @@ void MiterJoinPolyline::renderEdge(std::vector &anchors, std::vector