Vector2Extensions.Clamped

Extension Method in Vector2Extensions

Declaration

public static Vector2 Clamped(this Vector2 vector, Vector2 min, Vector2 max)

Description

Clamps the vector to the range [min..max].

Parameters

vectorThe vector to clamp.
minThe minimum value.
maxThe maximum value.

Returns

Vector2A new clamped vector.