mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-19 13:33:40 -04:00
MSVC warnings (#5595)
This commit is contained in:
@ -89,7 +89,7 @@ int main(void)
|
||||
|
||||
// Cotangent (orange)
|
||||
DrawLineEx((Vector2){ center.x , limitMin.y }, (Vector2){ cotangentPoint.x, limitMin.y }, 2.0f, ORANGE);
|
||||
DrawLineDashed(center, cotangentPoint, 10.0f, 4.0f, ORANGE);
|
||||
DrawLineDashed(center, cotangentPoint, 10, 4, ORANGE);
|
||||
|
||||
// Side background
|
||||
DrawLine(580, 0, 580, GetScreenHeight(), (Color){ 218, 218, 218, 255 });
|
||||
@ -106,48 +106,48 @@ int main(void)
|
||||
DrawLineEx((Vector2){ start.x, start.y + start.height/2 }, (Vector2){ start.x + start.width, start.y + start.height/2 }, 2.0f, GRAY);
|
||||
|
||||
// Wave graph axis labels
|
||||
DrawText("1", start.x - 8, start.y, 6, GRAY);
|
||||
DrawText("0", start.x - 8, start.y + start.height/2 - 6, 6, GRAY);
|
||||
DrawText("-1", start.x - 12, start.y + start.height - 8, 6, GRAY);
|
||||
DrawText("0", start.x - 2, start.y + start.height + 4, 6, GRAY);
|
||||
DrawText("360", start.x + start.width - 8, start.y + start.height + 4, 6, GRAY);
|
||||
DrawText("1", (int)start.x - 8, (int)start.y, 6, GRAY);
|
||||
DrawText("0", (int)start.x - 8, (int)start.y + (int)start.height/2 - 6, 6, GRAY);
|
||||
DrawText("-1", (int)start.x - 12, (int)start.y + (int)start.height - 8, 6, GRAY);
|
||||
DrawText("0", (int)start.x - 2, (int)start.y + (int)start.height + 4, 6, GRAY);
|
||||
DrawText("360", (int)start.x + (int)start.width - 8, (int)start.y + (int)start.height + 4, 6, GRAY);
|
||||
|
||||
// Sine (red - vertical)
|
||||
DrawLineEx((Vector2){ center.x, center.y }, (Vector2){ center.x, point.y }, 2.0f, RED);
|
||||
DrawLineDashed((Vector2){ point.x, center.y }, (Vector2){ point.x, point.y }, 10.0f, 4.0f, RED);
|
||||
DrawLineDashed((Vector2){ point.x, center.y }, (Vector2){ point.x, point.y }, 10, 4, RED);
|
||||
DrawText(TextFormat("Sine %.2f", sinRad), 640, 190, 6, RED);
|
||||
DrawCircleV((Vector2){ start.x + (angle/360.0f)*start.width, start.y + ((-sinRad + 1)*start.height/2.0f) }, 4.0f, RED);
|
||||
DrawSplineLinear(sinePoints, WAVE_POINTS, 1.0f, RED);
|
||||
|
||||
// Cosine (blue - horizontal)
|
||||
DrawLineEx((Vector2){ center.x, center.y }, (Vector2){ point.x, center.y }, 2.0f, BLUE);
|
||||
DrawLineDashed((Vector2){ center.x , point.y }, (Vector2){ point.x, point.y }, 10.0f, 4.0f, BLUE);
|
||||
DrawLineDashed((Vector2){ center.x , point.y }, (Vector2){ point.x, point.y }, 10, 4, BLUE);
|
||||
DrawText(TextFormat("Cosine %.2f", cosRad), 640, 210, 6, BLUE);
|
||||
DrawCircleV((Vector2){ start.x + (angle/360.0f)*start.width, start.y + ((-cosRad + 1)*start.height/2.0f) }, 4.0f, BLUE);
|
||||
DrawSplineLinear(cosPoints, WAVE_POINTS, 1.0f, BLUE);
|
||||
|
||||
// Tangent (purple)
|
||||
DrawLineEx((Vector2){ limitMax.x , center.y }, (Vector2){ limitMax.x, tangentPoint.y }, 2.0f, PURPLE);
|
||||
DrawLineDashed(center, tangentPoint, 10.0f, 4.0f, PURPLE);
|
||||
DrawLineDashed(center, tangentPoint, 10, 4, PURPLE);
|
||||
DrawText(TextFormat("Tangent %.2f", tangent), 640, 230, 6, PURPLE);
|
||||
|
||||
// Cotangent (orange)
|
||||
DrawText(TextFormat("Cotangent %.2f", cotangent), 640, 250, 6, ORANGE);
|
||||
|
||||
// Complementary angle (beige)
|
||||
DrawCircleSectorLines(center, radius*0.6f , -angle, -90.0f , 36.0f, BEIGE);
|
||||
DrawCircleSectorLines(center, radius*0.6f , -angle, -90.0f , 36, BEIGE);
|
||||
DrawText(TextFormat("Complementary %0.f°",complementary), 640, 150, 6, BEIGE);
|
||||
|
||||
// Supplementary angle (darkblue)
|
||||
DrawCircleSectorLines(center, radius*0.5f , -angle, -180.0f , 36.0f, DARKBLUE);
|
||||
DrawCircleSectorLines(center, radius*0.5f , -angle, -180.0f , 36, DARKBLUE);
|
||||
DrawText(TextFormat("Supplementary %0.f°",supplementary), 640, 130, 6, DARKBLUE);
|
||||
|
||||
// Explementary angle (pink)
|
||||
DrawCircleSectorLines(center, radius*0.4f , -angle, -360.0f , 36.0f, PINK);
|
||||
DrawCircleSectorLines(center, radius*0.4f , -angle, -360.0f , 36, PINK);
|
||||
DrawText(TextFormat("Explementary %0.f°",explementary), 640, 170, 6, PINK);
|
||||
|
||||
// Current angle - arc (lime), radius (black), endpoint (black)
|
||||
DrawCircleSectorLines(center, radius*0.7f , -angle, 0.0f, 36.0f, LIME);
|
||||
DrawCircleSectorLines(center, radius*0.7f , -angle, 0.0f, 36, LIME);
|
||||
DrawLineEx((Vector2){ center.x , center.y }, point, 2.0f, BLACK);
|
||||
DrawCircleV(point, 4.0f, BLACK);
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
//----------------------------------------------------------------------------------
|
||||
typedef struct TurtleState {
|
||||
Vector2 origin;
|
||||
double angle;
|
||||
float angle;
|
||||
} TurtleState;
|
||||
|
||||
typedef struct PenroseLSystem {
|
||||
|
||||
@ -160,7 +160,7 @@ int main(void)
|
||||
|
||||
// Draw inner circle to create donut effect
|
||||
// TODO: This is a hacky solution, better use DrawRing()
|
||||
if (showDonut) DrawCircle(center.x, center.y, donutInnerRadius, RAYWHITE);
|
||||
if (showDonut) DrawCircleV(center, donutInnerRadius, RAYWHITE);
|
||||
|
||||
startAngle += sweepAngle;
|
||||
}
|
||||
|
||||
@ -47,8 +47,8 @@ int main(void)
|
||||
// Setup the stars with a random position
|
||||
for (int i = 0; i < STAR_COUNT; i++)
|
||||
{
|
||||
stars[i].x = GetRandomValue(-screenWidth*0.5f, screenWidth*0.5f);
|
||||
stars[i].y = GetRandomValue(-screenHeight*0.5f, screenHeight*0.5f);
|
||||
stars[i].x = (float)GetRandomValue(-screenWidth / 2, (int)screenWidth / 2);
|
||||
stars[i].y = (float)GetRandomValue(-screenHeight / 2, (int)screenHeight / 2);
|
||||
stars[i].z = 1.0f;
|
||||
}
|
||||
|
||||
@ -85,8 +85,8 @@ int main(void)
|
||||
if ((stars[i].z < 0.0f) || (starsScreenPos[i].x < 0) || (starsScreenPos[i].y < 0.0f) ||
|
||||
(starsScreenPos[i].x > screenWidth) || (starsScreenPos[i].y > screenHeight))
|
||||
{
|
||||
stars[i].x = GetRandomValue(-screenWidth*0.5f, screenWidth*0.5f);
|
||||
stars[i].y = GetRandomValue(-screenHeight*0.5f, screenHeight*0.5f);
|
||||
stars[i].x = (float)GetRandomValue(-screenWidth / 2, screenWidth / 2);
|
||||
stars[i].y = (float)GetRandomValue(-screenHeight / 2, screenHeight / 2);
|
||||
stars[i].z = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user