Example #1
0
        public CartesianVector(Coordinates.ICoordinate <T> point1, Coordinates.ICoordinate <T> point2) : base(new double[0, 0])
        {
            if (point1.Dimentions != point2.Dimentions)
            {
                throw new ArgumentException("Coordinates provided belonged to cartesian systems with different numbers of dimentions.");
            }

            Data = new decimal[point1.Dimentions, 1];
            for (int i = 0; i < point1.Dimentions; i++)
            {
                Data[i, 0] = point2.Ordinates[i] - point1.Ordinates[i];
            }

            Rows    = point1.Dimentions;
            Columns = 1;
        }
 public LocatedCartesianVector(Coordinates.ICoordinate <T> location, params decimal[] components) : base(components)
 {
     Location = location;
 }
 public LocatedCartesianVector(Coordinates.ICoordinate <T> location, Coordinates.ICoordinate <T> point1, Coordinates.ICoordinate <T> point2) : base(point1, point2)
 {
     Location = location;
 }
 public LocatedCartesianVector(Coordinates.ICoordinate <T> location, CartesianVector <T> vector) : base(vector)
 {
     Location = location;
 }