/// <summary> /// Determines whether the specified cone is equal to the current instance of <see cref="Cone"/> /// with a given precision. /// </summary> /// <param name="v">The cone to compare.</param> /// <param name="epsilon">The precision value.</param> /// <returns>True if the specified cone is equal to the current instance of <see cref="Cone"/>; False otherwise.</returns> public bool Equals(Cone v, double epsilon) { if (!Origin.Equals(ref v.Origin, epsilon)) { return(false); } if (!Axis.Equals(ref v.Axis, epsilon)) { return(false); } if (Math.Abs(Angle - v.Angle) > epsilon) { return(false); } return(true); }
// /// <summary> /// Constructs a cone with another specified <see cref="Cone"/> object. /// </summary> /// <param name="source">A specified cone.</param> public Cone(Cone source) { Origin = source.Origin; Axis = source.Axis; Angle = source.Angle; }
public bool Intersects(Cone cone) { return(cone.Intersects(this)); }