Method WithRandomOffset
WithRandomOffset(Vector2, Vector2)
Adds a random offset to the X and Y components of the vector, within the range specified by the maxOffset.
Declaration
public static Vector2 WithRandomOffset(this Vector2 vector, Vector2 maxOffset)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vector | The original vector. |
Vector2 | maxOffset | The maximum random offset for each component. |
Returns
Type | Description |
---|---|
Vector2 | A new vector with the random offset applied. |