summaryrefslogtreecommitdiffhomepage
path: root/examples/core_3d_camera_free.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2016-01-16 12:52:55 +0100
committerraysan5 <[email protected]>2016-01-16 12:52:55 +0100
commit183795b8aa78fdf0b8064d72d77eaea8e7b6397b (patch)
tree1d18bec6a5510d3c225f05d09cc9649492cb4209 /examples/core_3d_camera_free.c
parent91e00431d48ad90602af30ee015922243cf975cd (diff)
downloadraylib-183795b8aa78fdf0b8064d72d77eaea8e7b6397b.tar.gz
raylib-183795b8aa78fdf0b8064d72d77eaea8e7b6397b.zip
Review literals type
Diffstat (limited to 'examples/core_3d_camera_free.c')
-rw-r--r--examples/core_3d_camera_free.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/core_3d_camera_free.c b/examples/core_3d_camera_free.c
index be44ed2a..df1b480c 100644
--- a/examples/core_3d_camera_free.c
+++ b/examples/core_3d_camera_free.c
@@ -21,9 +21,12 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera free");
// Define the camera to look into our 3d world
- Camera camera = {{ 0.0, 10.0, 10.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }};
+ Camera camera;
+ camera.position = (Vector3){ 0.0f, 10.0f, 10.0f };
+ camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
+ camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
- Vector3 cubePosition = { 0.0, 0.0, 0.0 };
+ Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
SetCameraMode(CAMERA_FREE); // Set a free camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our camera position
@@ -48,10 +51,10 @@ int main()
Begin3dMode(camera);
- DrawCube(cubePosition, 2, 2, 2, RED);
- DrawCubeWires(cubePosition, 2, 2, 2, MAROON);
+ DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
+ DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
- DrawGrid(10.0, 1.0);
+ DrawGrid(10, 1.0f);
End3dMode();