Repository: godotengine/godot
File: modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs (C#)

Code before:
            if (to.x > end.x)
            {
                end.x = to.x;
            }
            if (to.y > end.y)
            {
                end.y = to.y;
            }

            expanded._position = begin;
            expanded._size = end - begin;

            return expanded;
        }

        /// <summary>
        /// Returns the area of the <see cref="Rect2"/>.
        /// </summary>
        /// <returns>The area.</returns>
        public int GetArea()
        {
            return _size.x * _size.y;
        }

        /// <summary>
        /// Returns a copy of the <see cref="Rect2i"/> grown by the specified amount
        /// on all sides.
        /// </summary>
        /// <seealso cref="GrowIndividual(int, int, int, int)"/>
        /// <seealso cref="GrowSide(Side, int)"/>
        /// <param name="by">The amount to grow by.</param>
        /// <returns>The grown <see cref="Rect2i"/>.</returns>
        public Rect2i Grow(int by)
        {
            Rect2i g = this;

            g._position.x -= by;
            g._position.y -= by;
            g._size.x += by * 2;
            g._size.y += by * 2;

            return g;
        }

        /// <summary>
        /// Returns a copy of the <see cref="Rect2i"/> grown by the specified amount
        /// on each side individually.
        /// </summary>
        /// <seealso cref="Grow(int)"/>
        /// <seealso cref="GrowSide(Side, int)"/>
        /// <param name="left">The amount to grow by on the left side.</param>

Review comment (suggestion):
```suggestion
        /// Returns the center of the <see cref="Rect2i"/>, which is equal
        /// to <see cref="Position"/> + (<see cref="Size"/> / 2).
        /// If <see cref="Size"/> is an odd number, the returned center
        /// value will be rounded towards <see cref="Position"/>.
```

Be sure to update the other C# methods in AABB and Rect2 to look like this (just the first sentence though).

Code after:
            if (to.x > end.x)
            {
                end.x = to.x;
            }
            if (to.y > end.y)
            {
                end.y = to.y;
            }

            expanded._position = begin;
            expanded._size = end - begin;

            return expanded;
        }

        /// <summary>
        /// Returns the area of the <see cref="Rect2i"/>.
        /// </summary>
        /// <returns>The area.</returns>
        public int GetArea()
        {
            return _size.x * _size.y;
        }

        /// <summary>
        /// Returns the center of the <see cref="Rect2i"/>, which is equal
        /// to <see cref="Position"/> + (<see cref="Size"/> / 2).
        /// If <see cref="Size"/> is an odd number, the returned center
        /// value will be rounded towards <see cref="Position"/>.
        /// </summary>
        /// <returns>The center.</returns>
        public Vector2i GetCenter()
        {
            return _position + (_size / 2);
        }

        /// <summary>
        /// Returns a copy of the <see cref="Rect2i"/> grown by the specified amount
        /// on all sides.
        /// </summary>
        /// <seealso cref="GrowIndividual(int, int, int, int)"/>
        /// <seealso cref="GrowSide(Side, int)"/>
        /// <param name="by">The amount to grow by.</param>
        /// <returns>The grown <see cref="Rect2i"/>.</returns>
        public Rect2i Grow(int by)
        {
            Rect2i g = this;

            g._position.x -= by;
            g._position.y -= by;
            g._size.x += by * 2;