GetGameViewAspectRatio() private méthode

private GetGameViewAspectRatio ( ) : float
Résultat float
        private static float GetFrustumAspectRatio(Camera camera)
        {
            Rect rect = camera.rect;

            if ((double)rect.width <= 0.0 || (double)rect.height <= 0.0)
            {
                return(-1f);
            }
            return(CameraEditor.GetGameViewAspectRatio() * (rect.width / rect.height));
        }
Exemple #2
0
        private static float GetFrustumAspectRatio(Camera camera)
        {
            Rect rect = camera.rect;

            if (rect.width <= 0f || rect.height <= 0f)
            {
                return(-1f);
            }
            float num = rect.width / rect.height;

            return(CameraEditor.GetGameViewAspectRatio() * num);
        }
        private static float GetFrustumAspectRatio(Camera camera)
        {
            Rect  rect = camera.rect;
            float result;

            if (rect.width <= 0f || rect.height <= 0f)
            {
                result = -1f;
            }
            else
            {
                float num = rect.width / rect.height;
                result = CameraEditor.GetGameViewAspectRatio() * num;
            }
            return(result);
        }