Created
December 21, 2014 17:49
-
-
Save veeneck/7af997b8e02a1d2bcc6d to your computer and use it in GitHub Desktop.
Swift oddity fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func boundScaleToWindow(scale:CGFloat) -> CGFloat { | |
| /// Right now, this is hard coded against a 2800x1880 image sitting in a 2048x1536 window whos center is 0.5/0.5 | |
| if(scale > 1.3) { | |
| return 1.3 | |
| } | |
| if(scale < 0.9) { | |
| return 0.9 | |
| } | |
| return scale | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment