<commit_before>﻿using Microsoft.Xna.Framework;

namespace MonoGame.Extended.Shapes
{
    public static class RectangleExtensions
    {
        /// <summary>
        /// Gets the corners of the rectangle in a clockwise direction starting at the top left.
        /// </summary>
        public static Point[] GetCorners(this Rectangle rectangle)
        {
            var corners = new Point[4];
            corners[0] = new Point(rectangle.Top, rectangle.Left);
            corners[1] = new Point(rectangle.Top, rectangle.Right);
            corners[2] = new Point(rectangle.Bottom, rectangle.Right);
            corners[3] = new Point(rectangle.Bottom, rectangle.Left);
            return corners;
        }

        /// <summary>
        /// Gets the corners of the rectangle in a clockwise direction starting at the top left.
        /// </summary>
        public static Vector2[] GetCorners(this RectangleF rectangle)
        {
            var corners = new Vector2[4];
            corners[0] = new Vector2(rectangle.Top, rectangle.Left);
            corners[1] = new Vector2(rectangle.Top, rectangle.Right);
            corners[2] = new Vector2(rectangle.Bottom, rectangle.Right);
            corners[3] = new Vector2(rectangle.Bottom, rectangle.Left);
            return corners;
        }<commit_msg>fixed a bug in rectangle GetCorners<commit_after>﻿using Microsoft.Xna.Framework;

namespace MonoGame.Extended.Shapes
{
    public static class RectangleExtensions
    {
        /// <summary>
        /// Gets the corners of the rectangle in a clockwise direction starting at the top left.
        /// </summary>
        public static Point[] GetCorners(this Rectangle rectangle)
        {
            var corners = new Point[4];
            corners[0] = new Point(rectangle.Left, rectangle.Top);
            corners[1] = new Point(rectangle.Right, rectangle.Top);
            corners[2] = new Point(rectangle.Right, rectangle.Bottom);
            corners[3] = new Point(rectangle.Left, rectangle.Bottom);
            return corners;
        }

        /// <summary>
        /// Gets the corners of the rectangle in a clockwise direction starting at the top left.
        /// </summary>
        public static Vector2[] GetCorners(this RectangleF rectangle)
        {
            var corners = new Vector2[4];
            corners[0] = new Vector2(rectangle.Left, rectangle.Top);
            corners[1] = new Vector2(rectangle.Right, rectangle.Top);
            corners[2] = new Vector2(rectangle.Right, rectangle.Bottom);
            corners[3] = new Vector2(rectangle.Left, rectangle.Bottom);
            return corners;
        }
{'fraction_non_alphanumeric': 0.10250569476082004, 'fraction_numerical': 0.012148823082763858, 'mean_word_length': 2.1823671497584543, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4039256', 'n_tokens_mistral': 687, 'n_tokens_neox': 692, 'n_words': 201}