Method Clamp
Clamp(Vector2, Vector2, Vector2)
Restricts a value to be within a specified range.
Declaration
public static Vector2 Clamp(Vector2 value, Vector2 min, Vector2 max)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | value | The value to clamp. |
Vector2 | min | The minimum value. |
Vector2 | max | The maximum value. |
Returns
Type | Description |
---|---|
Vector2 | The clamped value. |