/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public DSVector Cross(DSVector other) { if (other == null) { throw new System.ArgumentNullException("other"); } return(DSVector.ByCoordinates(Y * other.Z - Z * other.Y, Z * other.X - X * other.Z, X * other.Y - Y * other.X)); }
/// <summary> /// /// </summary> /// <returns></returns> public DSVector Normalize() { return(DSVector.ByCoordinates(vector.X, vector.Y, vector.Z, true)); }
/// <summary> /// /// </summary> /// <param name="scalingFactor"></param> /// <returns></returns> public DSVector Scale(double scalingFactor) { return(DSVector.ByCoordinates(X * scalingFactor, Y * scalingFactor, Z * scalingFactor)); }
public static DSVector GetVectorTo(this IPointEntity fromPoint, IPointEntity toPoint) { return(DSVector.ByCoordinates(toPoint.X - fromPoint.X, toPoint.Y - fromPoint.Y, toPoint.Z - fromPoint.Z)); }