Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const float stdAspect = 720f/1280f;
- const float stdCameraSize = 4.8f;
- float width = 1125f; //GetCurrentScreenWidthInPixels()
- float height = 2436f; //GetCurrentScreenHeightInPixels()
- float currentAspect = width/height;
- if(currentAspect < stdAspect)
- {
- float newCameraSize = stdCameraSize*(stdAspect/currentAspect);
- Console.WriteLine(newCameraSize);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement