Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


FloorToInt(Vector2)

Converts a Vector2 to a Vector2Int by doing a Floor to each value.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static Vector2Int FloorToInt(Vector2 v)

Parameters

The Vector2 to convert.

Returns

Type

Description

Vector2IntThe converted Vector2 as a Vector2Int.

Remarks

As there is a conversion of float to integer, there is a loss of precision.