mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
BugFix: correctly approximate rendering output aspect ratio
This commit is contained in:
@@ -64,7 +64,7 @@ glm::ivec2 RenderView::presetFromResolution(glm::vec3 resolution)
|
||||
// get aspect ratio parameter
|
||||
float myratio = resolution.x / resolution.y;
|
||||
for(int ar = 0; ar < num_ar; ar++) {
|
||||
if ( ABS_DIFF( myratio, RenderView::ratio_preset_value[ar].x / RenderView::ratio_preset_value[ar].y ) < EPSILON){
|
||||
if ( ABS_DIFF( myratio, RenderView::ratio_preset_value[ar].x / RenderView::ratio_preset_value[ar].y ) < 0.01f){
|
||||
ret.x = ar;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user