From bb09c50496b60b16a75a2955a93fb485593bf0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Thu, 30 Aug 2018 10:09:52 +0200 Subject: [PATCH] Fix a bug --- raycastlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raycastlib.h b/raycastlib.h index 9cd83aa..48b533b 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -195,7 +195,7 @@ Unit dist(Vector2D p1, Vector2D p2) { Unit dx = p2.x - p1.x; Unit dy = p2.y - p1.y; - return sqrtInt(((uint16_t) dx * dx) + ((uint16_t) dy * dy)); + return sqrtInt((dx * dx) + (dy * dy)); } int8_t pointIsLeftOfRay(Vector2D point, Ray ray)