summaryrefslogtreecommitdiffhomepage
path: root/src/rshapes.c
diff options
context:
space:
mode:
authorJeffery Myers <[email protected]>2023-01-20 07:05:19 -0800
committerGitHub <[email protected]>2023-01-20 16:05:19 +0100
commitedaca16d7c007846422cd6e098b117f6f8bab99d (patch)
treec50c4a444abbeeaf0db2fd15cd9ca38ec5f2ebb7 /src/rshapes.c
parent116603e61c43ea272c6114c45f22faf924dafac9 (diff)
downloadraylib-edaca16d7c007846422cd6e098b117f6f8bab99d.tar.gz
raylib-edaca16d7c007846422cd6e098b117f6f8bab99d.zip
Fix warnings in raylib project from MSVC (#2871)
Diffstat (limited to 'src/rshapes.c')
-rw-r--r--src/rshapes.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rshapes.c b/src/rshapes.c
index 371abe2c..86e014e2 100644
--- a/src/rshapes.c
+++ b/src/rshapes.c
@@ -105,7 +105,7 @@ void SetShapesTexture(Texture2D texture, Rectangle source)
// Draw a pixel
void DrawPixel(int posX, int posY, Color color)
{
- DrawPixelV((Vector2){ posX, posY }, color);
+ DrawPixelV((Vector2){ (float)posX, (float)posY }, color);
}
// Draw a pixel (Vector version)
@@ -156,8 +156,8 @@ void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color colo
{
rlBegin(RL_LINES);
rlColor4ub(color.r, color.g, color.b, color.a);
- rlVertex2f(startPosX, startPosY);
- rlVertex2f(endPosX, endPosY);
+ rlVertex2f((float)startPosX, (float)startPosY);
+ rlVertex2f((float)endPosX, (float)endPosY);
rlEnd();
}
@@ -209,7 +209,7 @@ void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color)
float dy = current.y-previous.y;
float dx = current.x-previous.x;
- float size = 0.5*thick/sqrt(dx*dx+dy*dy);
+ float size = 0.5f*thick/sqrtf(dx*dx+dy*dy);
if (i==1)
{
@@ -254,7 +254,7 @@ void DrawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, fl
float dy = current.y-previous.y;
float dx = current.x-previous.x;
- float size = 0.5*thick/sqrt(dx*dx+dy*dy);
+ float size = 0.5f*thick/sqrtf(dx*dx+dy*dy);
if (i==1)
{
@@ -299,7 +299,7 @@ void DrawLineBezierCubic(Vector2 startPos, Vector2 endPos, Vector2 startControlP
float dy = current.y-previous.y;
float dx = current.x-previous.x;
- float size = 0.5*thick/sqrt(dx*dx+dy*dy);
+ float size = 0.5f*thick/sqrtf(dx*dx+dy*dy);
if (i==1)
{