TuxedoBerries.ScenePanel.Drawers.ScreenshotDrawer.MaxHeight C# (CSharp) Method

MaxHeight() private method

private MaxHeight ( Texture texture ) : float
texture UnityEngine.Texture
return float
        private float MaxHeight(Texture texture)
        {
            if (texture == null)
                return 0;

            float scale = 128f / (Mathf.Max(texture.width, texture.height) * 1f);
            return scale * texture.height;
        }