ドキュメント

Unity Engine

Unity Engine

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

other

The object to compare against this vector.

Returns

Type

Description

bool
true
if
other
is a Vector4 that is exactly equal to this vector, otherwise
false
.

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

other

The vector to compare against this vector.

Returns

Type

Description

bool
true
if the given vector is exactly equal to this vector, otherwise
false
.

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

other

The vector to compare against this vector.

Returns

Type

Description

bool
true
if the given vector is exactly equal to this vector, otherwise
false
.

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.