From 34561fdeff38298e0f78dac4f365eb2858c6cd68 Mon Sep 17 00:00:00 2001 From: Luigi Rosso Date: Thu, 16 Jun 2022 16:00:42 -0700 Subject: [PATCH] Corect version of min. --- src/shapes/path.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shapes/path.cpp b/src/shapes/path.cpp index cd7fe1d4..891e8d1c 100644 --- a/src/shapes/path.cpp +++ b/src/shapes/path.cpp @@ -17,9 +17,9 @@ computeIdealControlPointDistance(const Vec2D& toPrev, const Vec2D& toNext, float // Get the angle between next and prev float angle = fabs(atan2(Vec2D::cross(toPrev, toNext), Vec2D::dot(toPrev, toNext))); - return min(radius, - (4.0f / 3.0f) * tan(math::PI / (2.0f * ((2.0f * math::PI) / angle))) * radius * - (angle < math::PI / 2 ? 1 + cos(angle) : 2.0f - sin(angle))); + return fmin(radius, + (4.0f / 3.0f) * tan(math::PI / (2.0f * ((2.0f * math::PI) / angle))) * radius * + (angle < math::PI / 2 ? 1 + cos(angle) : 2.0f - sin(angle))); } StatusCode Path::onAddedClean(CoreContext* context) {