/// <summary> /// Ob objekte gleich sind (Algorithmus steht in Aufgabestellung) /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { PointVectorBase objet = new Test(); bool egal = false; PointVectorBase obj1 = this; if (obj != null || obj1 != null) { if (obj.GetType() == obj1.GetType()) { objet = (PointVectorBase)obj; if (objet.x == obj1.x && objet.y == obj1.y && objet.z == obj1.z) { egal = true; } } } return(egal); }
protected PointVectorBase(PointVectorBase source) { }
/// <summary> /// Methoden /// </summary> /// <param name="pvb"></param> /// <returns></returns> protected double CalculateDistanceTo(PointVectorBase pvb) { return(Math.Sqrt(Math.Pow(pvb.x - this.x, 2) + Math.Pow(pvb.y - this.y, 2) + Math.Pow(pvb.z - this.z, 2))); }
public Test(PointVectorBase source) { }