Exemple #1
0
        public static Aspects NextAspect(Angle angle, bool isExpanding)
        {
            Aspects temp = isExpanding ? Aspects.NextAspectOf(angle) : Aspects.PreviousAspectOf(angle);

            if (Math.Abs(temp.OrbOf(angle)) > Negligible)
            {
                return(temp);
            }
            else
            {
                return(isExpanding ? Aspects.NextAspectOf(temp) : Aspects.PreviousAspectOf(temp));
            }
        }
Exemple #2
0
        private Polygon(string name, int edges, bool isPolygon, int fold, bool isEven)
        {
            Name      = name;
            Edges     = edges;
            Fold      = fold;
            IsEven    = isEven;
            IsPolygon = isPolygon;

            if (isPolygon)
            {
                AngleOf = new IndexToAngleDelegate(AngleOnLine);
                IndexOf = new AngleOnRoundToIndexDelegate(IndexOnLine);
            }
            else
            {
                AngleOf = new IndexToAngleDelegate(AngleOnArc);
                IndexOf = new AngleOnRoundToIndexDelegate(IndexOnArc);
            }

            Vertices = new Dictionary <int, Angle>();

            double sectorDegrees = 360.0 / Edges;

            Sector = new Angle(sectorDegrees);

            List <double> concerned = new List <double>(DueDirections);

            for (int i = 0; i <= Edges; i++)
            {
                double vertexDegree = FirstVertexDegree + i * sectorDegrees;

                //if (vertexDegree > 360)
                //    continue;

                Vertices.Add(i, new Angle(vertexDegree));

                if (!concerned.Contains(vertexDegree))
                {
                    concerned.Add(vertexDegree);
                }
            }

            Outstandings = Aspects.GetAspectsDictionary(concerned);
        }
Exemple #3
0
 public Aspects PreviousAspectOf(Angle angle)
 {
     return(Aspects.PreviousAspectOf(Outstandings, angle));
 }
Exemple #4
0
 public Aspects NextAspectOf(Angle angle)
 {
     return(Aspects.NextAspectOf(Outstandings, angle));
 }
Exemple #5
0
 public Aspects AspectBetween(Angle start, Angle end)
 {
     return(Aspects.AspectBetween(Outstandings, start, end));
 }
Exemple #6
0
 public Aspects CurrentAspectOf(Angle angle)
 {
     return(Aspects.CurrentAspectOf(Outstandings, angle));
 }