ClampMagnitude
Creates a copy of a given vector, with its magnitude clamped to a maximum length.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
ClampMagnitude(Vector2, float)
Creates a copy of a given vector, with its magnitude clamped to a maximum length.
public static Vector2 ClampMagnitude(Vector2 vector, float maxLength)
Parameters
Returns
Type | Description |
|---|---|
| Vector2 | A copy of |
ClampMagnitude(Vector2, float)
Creates a copy of a given vector, with its magnitude clamped to a maximum length.
public static Vector2 ClampMagnitude(in Vector2 vector, float maxLength)
Parameters
Returns
Type | Description |
|---|---|
| Vector2 | A copy of |