diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2021-01-26 22:27:44 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2021-01-26 22:27:44 +0100 |
| commit | d3b08c7e8bf808281e32fdef5e5222fb6633a5d0 (patch) | |
| tree | d25b4f72694e9624ba30e112aef7849d03512c75 /src/utils.cpp | |
| parent | fbe4f159bc4d9f801128fbb487e9e86d3786062c (diff) | |
Improve XCB keyboard inputs handling
Diffstat (limited to 'src/utils.cpp')
| -rw-r--r-- | src/utils.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/utils.cpp b/src/utils.cpp index 1c6fac1..3416714 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -91,8 +91,7 @@ void random_scene(sphere *world) { struct input_data create_inputs(uint32_t width, uint32_t height) { // Image dimensions - // const float aspect_ratio = 16.0 / 9.0; - const float aspect_ratio = 1; + const float aspect_ratio = (float)width / (float) height; const uint32_t samples_per_pixel = 1; const uint32_t max_depth = 2; |
