Edytuj

Udostępnij za pośrednictwem


VectorExtensions.CloseEnough(Vector3, Vector3, Single) Method

Definition

Determines if the distance between two vectors is within a given tolerance.

public:
 static bool CloseEnough(UnityEngine::Vector3 v1, UnityEngine::Vector3 v2, float distanceTolerance);
public static bool CloseEnough (UnityEngine.Vector3 v1, UnityEngine.Vector3 v2, float distanceTolerance);
static member CloseEnough : UnityEngine.Vector3 * UnityEngine.Vector3 * single -> bool
Public Function CloseEnough (v1 As Vector3, v2 As Vector3, distanceTolerance As Single) As Boolean

Parameters

v1
UnityEngine.Vector3

The first vector.

v2
UnityEngine.Vector3

The second vector.

distanceTolerance
Single

The maximum distance that will cause this to return true.

Returns

True if the distance between the two vectors is within the tolerance, false otherwise.

Applies to