FlatRedBall.Camera.FixAspectRatioYConstant C# (CSharp) Method

FixAspectRatioYConstant() public method

Sets the aspectRatio to match the width/height of the area that the camera is drawing to.
This is usually used in applications with split screen or when on a widescreen display.
public FixAspectRatioYConstant ( ) : void
return void
        public void FixAspectRatioYConstant()
        {
            // We may have a 0-height
            // DestinationRectangle in
            // test scenarios.
            if (mDestinationRectangle.Height != 0)
            {
                this.AspectRatio = (float)mDestinationRectangle.Width / (float)mDestinationRectangle.Height;

                mOrthogonalWidth = mOrthogonalHeight * mAspectRatio;
            }
        }