public Distance(Control c, DistanceOrientation o, DistanceUnits u, double v) { this.control = c; this.orientation = o; this.units = u; this.val = v; }
public static double Distance(Vector3 point1, Vector3 point2, DistanceOrientation pOrientation) { if (pOrientation == DistanceOrientation.XAxis) { return(point2.X - point1.X); } else if (pOrientation == DistanceOrientation.YAxis) { return(point2.Y - point1.Y); } else if (pOrientation == DistanceOrientation.ZAxis) { return(point2.Z - point1.Z); } throw new Exception(); }