Bläddra i källkod

Replace 0.f by 0.0f

Ray 4 år sedan
förälder
incheckning
41192c6d4a

+ 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));