Created
November 9, 2016 07:05
-
-
Save AndriyBas/abffbf06b8ba91d2f4303164d71eed57 to your computer and use it in GitHub Desktop.
how to calculate the holy scale
This file contains 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
float widthAspect = 1.0F * canvasWidth / width; | |
float heightAspect = 1.0F * canvasHeight / height; | |
// fit the smallest size | |
holyScale = Math.min(widthAspect, heightAspect); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment