Edit

Bagikan melalui


MathUtilities.InRange Method

Definition

Overloads

InRange(Vector2, Vector2, Vector2)

Tests component-wise if a Vector2 is in a given range

InRange(Vector3, Vector3, Vector3)

Tests component-wise if a Vector3 is in a given range

InRange(Vector2, Vector2, Vector2)

Tests component-wise if a Vector2 is in a given range

public:
 static bool InRange(UnityEngine::Vector2 vec, UnityEngine::Vector2 lower, UnityEngine::Vector2 upper);
public static bool InRange (UnityEngine.Vector2 vec, UnityEngine.Vector2 lower, UnityEngine.Vector2 upper);
static member InRange : UnityEngine.Vector2 * UnityEngine.Vector2 * UnityEngine.Vector2 -> bool
Public Shared Function InRange (vec As Vector2, lower As Vector2, upper As Vector2) As Boolean

Parameters

vec
UnityEngine.Vector2

The vector to test

lower
UnityEngine.Vector2

The lower bounds

upper
UnityEngine.Vector2

The upper bounds

Returns

true if in range, otherwise false

Applies to

InRange(Vector3, Vector3, Vector3)

Tests component-wise if a Vector3 is in a given range

public:
 static bool InRange(UnityEngine::Vector3 vec, UnityEngine::Vector3 lower, UnityEngine::Vector3 upper);
public static bool InRange (UnityEngine.Vector3 vec, UnityEngine.Vector3 lower, UnityEngine.Vector3 upper);
static member InRange : UnityEngine.Vector3 * UnityEngine.Vector3 * UnityEngine.Vector3 -> bool
Public Shared Function InRange (vec As Vector3, lower As Vector3, upper As Vector3) As Boolean

Parameters

vec
UnityEngine.Vector3

The vector to test

lower
UnityEngine.Vector3

The lower bounds

upper
UnityEngine.Vector3

The upper bounds

Returns

true if in range, otherwise false

Applies to