CeilToInt
Converts a Vector2 to a Vector2Int by doing a Ceiling to each value.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
CeilToInt(Vector2)
Converts a Vector2 to a Vector2Int by doing a Ceiling to each value.
public static Vector2Int CeilToInt(Vector2 v)
Parameters
The Vector2 to convert.
Returns
Type | Description |
|---|---|
| Vector2Int | The converted Vector2 as a Vector2Int. |
Remarks
As there is a conversion of float to integer, there is a loss of precision.
CeilToInt(Vector2)
Converts a Vector2 to a Vector2Int by doing a Ceiling to each value.
public static Vector2Int CeilToInt(in Vector2 v)
Parameters
The Vector2 to convert.
Returns
Type | Description |
|---|---|
| Vector2Int | The converted Vector2 as a Vector2Int. |
Remarks
As there is a conversion of float to integer, there is a loss of precision.