<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PA.TileList.Geometrics.Circular
{
    // Describe a circular profile
    public class CircularProfile
    {
        public double Radius { get; private set; }

        /// <summary>
        /// Describe a circular profile step
        /// </summary>
        public class ProfileStep
        {
            /// <summary>
            /// Trigonometric angle
            /// </summary>
            public double Angle { get; internal set; }

            /// <summary>
            /// Distance from center 
            /// </summary>
            public double Radius { get; internal set; }

            internal ProfileStep(ProfileStep s)
            {
                this.Angle = s.Angle;
                this.Radius = s.Radius;
            }

            public ProfileStep(double angle, double radius)
            {
                while (angle < -Math.PI)
                {
                    angle = angle + 2 * Math.PI;
                }

                while (angle > Math.PI)
                {
                    angle = angle - 2 * Math.PI;
                }

                this.Angle = angle;
                this.Radius = radius;
            }

            public override string ToString()
            {
                return  this.Angle + "°," + this.Radius ;
            }
        }


        private List<ProfileStep> profile;

        public IEnumerable<ProfileStep> Profile
        {
            get
            {
                if (this.profile.Count > 0)
                {
                    return this.profile.OrderBy(p => p.Angle);
                }
                else
                {
                    return new ProfileStep[] { new ProfileStep(0, this.Radius) };
                }<commit_msg>Remove -Pi/Pi limitation<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PA.TileList.Geometrics.Circular
{
    // Describe a circular profile
    public class CircularProfile
    {
        public double Radius { get; private set; }

        /// <summary>
        /// Describe a circular profile step
        /// </summary>
        public class ProfileStep
        {
            /// <summary>
            /// Trigonometric angle
            /// </summary>
            public double Angle { get; internal set; }

            /// <summary>
            /// Distance from center 
            /// </summary>
            public double Radius { get; internal set; }

            internal ProfileStep(ProfileStep s)
            {
                this.Angle = s.Angle;
                this.Radius = s.Radius;
            }

            public ProfileStep(double angle, double radius)
            {
                this.Angle = angle;
                this.Radius = radius;
            }

            public override string ToString()
            {
                return  this.Angle + "°," + this.Radius ;
            }
        }


        private List<ProfileStep> profile;

        public IEnumerable<ProfileStep> Profile
        {
            get
            {
                if (this.profile.Count > 0)
                {
                    return this.profile.OrderBy(p => p.Angle);
                }
                else
                {
                    return new ProfileStep[] { new ProfileStep(0, this.Radius) };
                }
{'fraction_non_alphanumeric': 0.09109429569266589, 'fraction_numerical': 0.0017462165308498253, 'mean_word_length': 1.076737160120846, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 24, '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': '4036826', 'n_tokens_mistral': 853, 'n_tokens_neox': 795, 'n_words': 212}