Vector.Equals Method

Compares two vectors for equality.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Equals(Object) Determines whether the specified Object is a Vector structure and, if it is, whether it has the same X and Y values as this vector. (Overrides ValueType.Equals(Object).)
Public method Equals(Vector) Compares two vectors for equality.
Public method Static member Equals(Vector, Vector) Compares the two specified vectors for equality.
Top

A vector's X and Y properties are described using Double values. Because the value of a Double can lose precision when arithmetic operations are performed on it, a comparison between two Double structures that are logically equal might fail.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft