Equals
Compares two vectors to each other and evaluates if they are equal.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
Equals(Object)
Compares two vectors to each other and evaluates if they are equal.
public override readonly bool Equals(object other)
Parameters
The object to compare against this vector.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
Due to floating point inaccuracies, this might return false for vectors which are essentially (but not exactly) equal. Use the == operator to test two vectors for approximate equality.
Equals(Vector4)
Compares two vectors to each other and evaluates if they are equal.
public readonly bool Equals(Vector4 other)
Parameters
The vector to compare against this vector.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
Due to floating point inaccuracies, this might return false for vectors which are essentially (but not exactly) equal. Use the == operator to test two vectors for approximate equality.
Equals(Vector4)
Compares two vectors to each other and evaluates if they are equal.
public readonly bool Equals(in Vector4 other)
Parameters
The vector to compare against this vector.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
Due to floating point inaccuracies, this might return false for vectors which are essentially (but not exactly) equal. Use the == operator to test two vectors for approximate equality.