Created
December 21, 2014 17:47
-
-
Save veeneck/e1875c65a9d4b5161783 to your computer and use it in GitHub Desktop.
Swift oddities
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(var 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) { | |
| scale = 1.3 | |
| } | |
| if(scale < 0.9) { | |
| scale = 0.9 | |
| } | |
| return scale | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment