public static Vector6D operator +(Vector6D v1, Vector6D v2) { Vector6D vector = new Vector6D(); for (int i = 0; i < Count; i++) { vector[i] = v1[i] + v2[i]; } return(vector); }
public static Vector6D operator -(Vector6D v) { Vector6D vector = new Vector6D(); for (int i = 0; i < Count; i++) { vector[i] = -v[i]; } return(vector); }
public static Point6D Subtract(Point6D point, Vector6D vector) { Point6D newPoint = new Point6D(); for (int i = 0; i < Count; i++) { newPoint[i] = point[i] - vector[i]; } return(newPoint); }
public static Vector6D Subtract(Point6D point1, Point6D point2) { Vector6D newVector = new Vector6D(); for (int i = 0; i < Count; i++) { newVector[i] = point1[i] - point2[i]; } return(newVector); }
public Vector6D Normalize() { double length = Length; Vector6D vector = new Vector6D(); for (int i = 0; i < Count; i++) { vector[i] = this[i] / length; } return(vector); }
public Vector6D(Vector6D vector) : base(vector.Coords) { }