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

MaxWidth() private method

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

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