Vector2.Equals Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a value that indicates whether this instance and a specified Vector2 instance or a specified object are equal.
Overloads
| Name | Description |
|---|---|
| Equals(Vector2, Vector2) |
Compares two vectors to determine if they are equal on a per-element basis. |
| Equals(Object) |
Returns a value that indicates whether this instance and a specified object are equal. |
| Equals(Vector2) |
Returns a value that indicates whether this instance and another vector are equal. |
Equals(Vector2, Vector2)
- Source:
- Vector2.cs
Compares two vectors to determine if they are equal on a per-element basis.
public:
static System::Numerics::Vector2 Equals(System::Numerics::Vector2 left, System::Numerics::Vector2 right);
public static System.Numerics.Vector2 Equals(System.Numerics.Vector2 left, System.Numerics.Vector2 right);
static member Equals : System.Numerics.Vector2 * System.Numerics.Vector2 -> System.Numerics.Vector2
Public Shared Function Equals (left As Vector2, right As Vector2) As Vector2
Parameters
- left
- Vector2
The vector to compare with right.
- right
- Vector2
The vector to compare with left.
Returns
A vector whose elements are all-bits-set or zero, depending on if the corresponding elements in left and right were equal.
Applies to
Equals(Object)
- Source:
- Vector2.cs
- Source:
- Vector2.cs
- Source:
- Vector2.cs
- Source:
- Vector2.cs
Returns a value that indicates whether this instance and a specified object are equal.
public:
override bool Equals(System::Object ^ obj);
public override bool Equals(object obj);
public override readonly bool Equals(object? obj);
public override readonly bool Equals(object obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean
Parameters
- obj
- Object
The object to compare with the current instance.
Returns
true if the current instance and obj are equal; otherwise, false. If obj is null, the method returns false.
Remarks
The current instance and obj are equal if obj is a Vector2 object and their X and Y elements are equal.
Applies to
Equals(Vector2)
- Source:
- Vector2.cs
- Source:
- Vector2.cs
- Source:
- Vector2.cs
- Source:
- Vector2.cs
Returns a value that indicates whether this instance and another vector are equal.
public:
virtual bool Equals(System::Numerics::Vector2 other);
public bool Equals(System.Numerics.Vector2 other);
public readonly bool Equals(System.Numerics.Vector2 other);
override this.Equals : System.Numerics.Vector2 -> bool
Public Function Equals (other As Vector2) As Boolean
Parameters
- other
- Vector2
The other vector.
Returns
true if the two vectors are equal; otherwise, false.
Implements
Remarks
Two vectors are equal if their X and Y elements are equal.