Skip to content

Commit a9b5cf8

Browse files
committed
fix: Add 'f' suffix for float constants to avoid warning C4305
1 parent 08b1207 commit a9b5cf8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/basic_tests.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ TEST_CASE("Perspective Projection", "[basic]")
7373

7474
// References are generated by GLM's perspective projection (glm::perspective).
7575
Matrix4f references[5];
76-
references[0] << 1.8152, 0.0000, 0.0000, 0.0000, 0.0000, 2.4142, 0.0000, 0.0000, 0.0000, 0.0000,
77-
-1.0202, -0.2020, 0.0000, 0.0000, -1.0000, 0.0000;
78-
references[1] << 2.9432, 0.0000, 0.0000, 0.0000, 0.0000, 4.9152, 0.0000, 0.0000, 0.0000, 0.0000,
79-
-1.0002, -0.0200, 0.0000, 0.0000, -1.0000, 0.0000;
80-
references[2] << 1.5071, 0.0000, 0.0000, 0.0000, 0.0000, 1.4770, 0.0000, 0.0000, 0.0000, 0.0000,
81-
-1.0078, -1.8672, 0.0000, 0.0000, -1.0000, 0.0000;
82-
references[3] << 1.9652, 0.0000, 0.0000, 0.0000, 0.0000, 1.4150, 0.0000, 0.0000, 0.0000, 0.0000,
83-
-1.0209, -1.6571, 0.0000, 0.0000, -1.0000, 0.0000;
84-
references[4] << 0.9310, 0.0000, 0.0000, 0.0000, 0.0000, 1.1544, 0.0000, 0.0000, 0.0000, 0.0000,
85-
-1.0022, -0.8009, 0.0000, 0.0000, -1.0000, 0.0000;
76+
references[0] << 1.8152f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 2.4142f, 0.0000f, 0.0000f,
77+
0.0000f, 0.0000f, -1.0202f, -0.2020f, 0.0000f, 0.0000f, -1.0000f, 0.0000f;
78+
references[1] << 2.9432f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 4.9152f, 0.0000f, 0.0000f,
79+
0.0000f, 0.0000f, -1.0002f, -0.0200f, 0.0000f, 0.0000f, -1.0000f, 0.0000f;
80+
references[2] << 1.5071f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 1.4770f, 0.0000f, 0.0000f,
81+
0.0000f, 0.0000f, -1.0078f, -1.8672f, 0.0000f, 0.0000f, -1.0000f, 0.0000f;
82+
references[3] << 1.9652f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 1.4150f, 0.0000f, 0.0000f,
83+
0.0000f, 0.0000f, -1.0209f, -1.6571f, 0.0000f, 0.0000f, -1.0000f, 0.0000f;
84+
references[4] << 0.9310f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 1.1544f, 0.0000f, 0.0000f,
85+
0.0000f, 0.0000f, -1.0022f, -0.8009f, 0.0000f, 0.0000f, -1.0000f, 0.0000f;
8686

8787
for (int i = 0; i < 5; ++i) {
8888
Camera camera(position, target, near_planes[i], far_planes[i], fov_ys[i], aspect_ratios[i]);

0 commit comments

Comments
 (0)