Ejemplo n.º 1
0
        public override double[] GetOrdinates(Ordinate ordinate)
        {
            if (IsEmpty)
            {
                return(new double[0]);
            }

            var ordinateFlag = (Ordinates)(1 << (int)ordinate);

            if ((_coordinates.Ordinates & ordinateFlag) != ordinateFlag)
            {
                return new[] { Coordinate.NullOrdinate }
            }
            ;

            double val = _coordinates.TryGetOrdinateIndex(ordinate, out int ordinateIndex)
                ? _coordinates.GetOrdinate(0, ordinateIndex)
                : Coordinate.NullOrdinate;

            return(new [] { val });
        }