SuperMeatBoy

SelfiepokerAspect

Feb 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1.             const float stdAspect = 720f/1280f;
  2.             const float stdCameraSize = 4.8f;
  3.            
  4.             float width = 1125f; //GetCurrentScreenWidthInPixels()
  5.             float height = 2436f; //GetCurrentScreenHeightInPixels()
  6.             float currentAspect = width/height;
  7.            
  8.             if(currentAspect < stdAspect)
  9.             {
  10.                 float newCameraSize = stdCameraSize*(stdAspect/currentAspect);
  11.                 Console.WriteLine(newCameraSize);
  12.             }
Advertisement
Add Comment
Please, Sign In to add comment