Equals() public static method

Checks whether the two passed numbers are equal, with respect to possible loss of precision caused by rounding values.
public static Equals ( float x, float y ) : bool
x float /// First number to compare. ///
y float /// Second number to compare. ///
return bool
Beispiel #1
0
 /// <summary>
 ///   Compares the passed circle to this one for equality.
 /// </summary>
 /// <param name="other">
 ///   Circle to compare.
 /// </param>
 /// <returns>
 ///   <c>true</c>, if both circles are equal, and <c>false</c> otherwise.
 /// </returns>
 public bool Equals(CircleF other)
 {
     return(this.center.Equals(other.center) && MathF.Equals(this.Radius, other.Radius));
 }
Beispiel #2
0
 /// <summary>
 ///   Compares the passed sphere to this one for equality.
 /// </summary>
 /// <param name="other">
 ///   Sphere to compare.
 /// </param>
 /// <returns>
 ///   <c>true</c>, if both spheres are equal, and <c>false</c> otherwise.
 /// </returns>
 public bool Equals(SphereF other)
 {
     return(this.Center.Equals(other.Center) && MathF.Equals(this.Radius, other.Radius));
 }