Преглед на файлове

Replace 0.f by 0.0f

pull/1408/head
Ray преди 4 години
родител
ревизия
41192c6d4a
променени са 6 файла, в които са добавени 17 реда и са изтрити 17 реда
  1. +2
    -2
      examples/core/core_2d_camera_platformer.c
  2. +1
    -1
      examples/shapes/shapes_draw_circle_sector.c
  3. +7
    -7
      projects/4coder/main.c
  4. +1
    -1
      src/camera.h
  5. +5
    -5
      src/core.c
  6. +1
    -1
      src/textures.c

+ 2
- 2
examples/core/core_2d_camera_platformer.c Целия файл

@ -15,8 +15,8 @@
#include "raymath.h"
#define G 400
#define PLAYER_JUMP_SPD 350.f
#define PLAYER_HOR_SPD 200.f
#define PLAYER_JUMP_SPD 350.0f
#define PLAYER_HOR_SPD 200.0f
typedef struct Player {
Vector2 position;

+ 1
- 1
examples/shapes/shapes_draw_circle_sector.c Целия файл

@ -27,7 +27,7 @@ int main(void)
Vector2 center = {(GetScreenWidth() - 300)/2, GetScreenHeight()/2 };
float outerRadius = 180.f;
float outerRadius = 180.0f;
int startAngle = 0;
int endAngle = 180;
int segments = 0;

+ 7
- 7
projects/4coder/main.c Целия файл

@ -8,19 +8,19 @@ int main() {
InitWindow(screenWidth, screenHeight, "raylib");
Camera cam;
cam.position = (Vector3){ 0.f, 10.f, 8.f };
cam.target = (Vector3){ 0.f, 0.f, 0.f };
cam.up = (Vector3){ 0.f, 1.f, 0.f };
cam.fovy = 60.f;
cam.position = (Vector3){ 0.0f, 10.0f, 8.f };
cam.target = (Vector3){ 0.0f, 0.0f, 0.0f };
cam.up = (Vector3){ 0.0f, 1.f, 0.0f };
cam.fovy = 60.0f;
cam.type = CAMERA_PERSPECTIVE;
Vector3 cubePos = { 0.f, 0.f, 0.f };
Vector3 cubePos = { 0.0f, 0.0f, 0.0f };
SetTargetFPS(60);
while (!WindowShouldClose()) {
cam.position.x = sin(GetTime()) * 10.f;
cam.position.z = cos(GetTime()) * 10.f;
cam.position.x = sin(GetTime()) * 10.0f;
cam.position.z = cos(GetTime()) * 10.0f;
BeginDrawing();
ClearBackground(RAYWHITE);

+ 1
- 1
src/camera.h Целия файл

@ -236,7 +236,7 @@ static void DisableCursor() {} // Lock cursor
static int IsKeyDown(int key) { return 0; }
static int IsMouseButtonDown(int button) { return 0;}
static float GetMouseWheelMove() { return 0.f; }
static float GetMouseWheelMove() { return 0.0f; }
static Vector2 GetMousePosition() { return (Vector2){ 0.0f, 0.0f }; }
#endif

+ 5
- 5
src/core.c Целия файл

@ -2725,9 +2725,9 @@ void SetMouseScale(float scaleX, float scaleY)
float GetMouseWheelMove(void)
{
#if defined(PLATFORM_ANDROID)
return 0.f;
return 0.0f;
#elif defined(PLATFORM_WEB)
return CORE.Input.Mouse.previousWheelMove/100.f;
return CORE.Input.Mouse.previousWheelMove/100.0f;
#else
return CORE.Input.Mouse.previousWheelMove;
#endif
@ -3896,7 +3896,7 @@ static void PollInputEvents(void)
// Register previous mouse states
CORE.Input.Mouse.previousWheelMove = CORE.Input.Mouse.currentWheelMove;
CORE.Input.Mouse.currentWheelMove = 0.f;
CORE.Input.Mouse.currentWheelMove = 0.0f;
for (int i = 0; i < 3; i++)
{
CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
@ -3918,7 +3918,7 @@ static void PollInputEvents(void)
// Register previous mouse states
CORE.Input.Mouse.previousWheelMove = CORE.Input.Mouse.currentWheelMove;
CORE.Input.Mouse.currentWheelMove = 0.f;
CORE.Input.Mouse.currentWheelMove = 0.0f;
for (int i = 0; i < 3; i++) CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
#endif // PLATFORM_UWP
@ -3934,7 +3934,7 @@ static void PollInputEvents(void)
// Register previous mouse wheel state
CORE.Input.Mouse.previousWheelMove = CORE.Input.Mouse.currentWheelMove;
CORE.Input.Mouse.currentWheelMove = 0.f;
CORE.Input.Mouse.currentWheelMove = 0.0f;
#endif
// Register previous touch states

+ 1
- 1
src/textures.c Целия файл

@ -587,7 +587,7 @@ Image GenImageGradientRadial(int width, int height, float density, Color inner,
float dist = hypotf((float)x - centerX, (float)y - centerY);
float factor = (dist - radius*density)/(radius*(1.0f - density));
factor = (float)fmax(factor, 0.f);
factor = (float)fmax(factor, 0.0f);
factor = (float)fmin(factor, 1.f); // dist can be bigger than radius so we have to check
pixels[y*width + x].r = (int)((float)outer.r*factor + (float)inner.r*(1.0f - factor));

Зареждане…
Отказ
Запис