summaryrefslogtreecommitdiffhomepage
path: root/src/rtextures.c
diff options
context:
space:
mode:
authorJeffery Myers <[email protected]>2024-07-01 13:03:21 -0700
committerGitHub <[email protected]>2024-07-01 22:03:21 +0200
commit9d3bd43c6ed48e6276687ccec8b9caabbf8f73d3 (patch)
tree6ff20bde1e740c5fc47ff89b05f4e94a6f2fa4df /src/rtextures.c
parentab20b2179f6d20c8a2e53761c57324cc987898d4 (diff)
downloadraylib-9d3bd43c6ed48e6276687ccec8b9caabbf8f73d3.tar.gz
raylib-9d3bd43c6ed48e6276687ccec8b9caabbf8f73d3.zip
[CORE] Fix MSVC warnings/errors and raymath.h in C++ (#4125)
* Update raylib_api.* by CI * Fix MSVC warnings. Make raymath.h work in C++ in MSVC * whitespace cleanup --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/rtextures.c')
-rw-r--r--src/rtextures.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rtextures.c b/src/rtextures.c
index 54bf7c6a..1e88b64a 100644
--- a/src/rtextures.c
+++ b/src/rtextures.c
@@ -3658,7 +3658,7 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color co
{
// Line is more horizontal
// Calculate half the width of the line
- int wy = (thick - 1)*sqrtf(dx*dx + dy*dy)/(2*abs(dx));
+ int wy = (thick - 1)*(int)sqrtf((float)(dx*dx + dy*dy))/(2*abs(dx));
// Draw additional lines above and below the main line
for (int i = 1; i <= wy; i++)
@@ -3671,7 +3671,7 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color co
{
// Line is more vertical or perfectly horizontal
// Calculate half the width of the line
- int wx = (thick - 1)*sqrtf(dx*dx + dy*dy)/(2*abs(dy));
+ int wx = (thick - 1)*(int)sqrtf((float)(dx*dx + dy*dy))/(2*abs(dy));
// Draw additional lines to the left and right of the main line
for (int i = 1; i <= wx; i++)