Vector.UpdateAspectRatio C# (CSharp) Method

UpdateAspectRatio() public method

public UpdateAspectRatio ( int width, int height ) : void
width int
height int
return void
    void UpdateAspectRatio(int width, int height)
    {
        var s = background.transform.localScale;
        s.x = s.y * width / height;
        background.transform.localScale = s;
    }