From 680e5b23a85d1dd8d843b4041270a45173f1d693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Fri, 14 Sep 2018 15:00:31 +0200 Subject: [PATCH] Fix sqrt data types --- raycastlib.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/raycastlib.h b/raycastlib.h index f78ba1a..5d96ccd 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -455,12 +455,13 @@ uint16_t sqrtInt(Unit value) { profileCall(sqrtInt); - Unit result = 0; - Unit a = value; - #ifdef RAYCAST_TINY - uint32_t b = 1u << 14; + uint16_t result = 0; + uint16_t a = value; + uint16_t b = 1u << 14; #else + uint32_t result = 0; + uint32_t a = value; uint32_t b = 1u << 30; #endif