Vector4.Equals 方法

定义

返回一个值,该值指示此实例是否与指定 Vector4 实例或指定对象相等。Returns a value that indicates whether this instance and a specified Vector4 instance or a specified object are equal.

重载

Equals(Vector4)

返回一个值,该值指示此实例是否与另一个向量相等。Returns a value that indicates whether this instance and another vector are equal.

Equals(Object)

返回一个值,该值指示此实例是否与指定对象相等。Returns a value that indicates whether this instance and a specified object are equal.

Equals(Vector4)

返回一个值,该值指示此实例是否与另一个向量相等。Returns a value that indicates whether this instance and another vector are equal.

public:
 virtual bool Equals(System::Numerics::Vector4 other);
public bool Equals (System.Numerics.Vector4 other);
override this.Equals : System.Numerics.Vector4 -> bool
Public Function Equals (other As Vector4) As Boolean

参数

other
Vector4

另一个向量。The other vector.

返回

Boolean

如果两个向量相等,则为 true;否则为 falsetrue if the two vectors are equal; otherwise, false.

实现

注解

如果两个向量相等,则两个向量相等 X Y Z WTwo vectors are equal if their X, Y, Z, and W elements are equal.

适用于

Equals(Object)

返回一个值,该值指示此实例是否与指定对象相等。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 bool Equals (object? obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean

参数

obj
Object

要与当前实例进行比较的对象。The object to compare with the current instance.

返回

Boolean

如果当前实例与 obj 相等,则为 true;否则为 falsetrue if the current instance and obj are equal; otherwise, false. 如果 objnull,则此方法返回 falseIf obj is null, the method returns false.

注解

obj如果 obj 是一个 Vector4 对象,并且其对应的元素相等,则当前实例和相等。The current instance and obj are equal if obj is a Vector4 object and their corresponding elements are equal.

适用于