Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


FloorToInt

Converts a given Vector3 into a Vector3Int by doing a Floor to each value.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

FloorToInt(Vector3)

Converts a given Vector3 into a
Vector3Int
by doing a Floor to each value.
public static Vector3Int FloorToInt(Vector3 v)

Parameters

The Vector3 to convert.

Returns

Type

Description

Vector3IntThe converted Vector3 as a Vector3Int.

Remarks

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

FloorToInt(Vector3)

Converts a given Vector3 into a
Vector3Int
by doing a Floor to each value.
public static Vector3Int FloorToInt(in Vector3 v)

Parameters

The Vector3 to convert.

Returns

Type

Description

Vector3IntThe converted Vector3 as a Vector3Int.

Remarks

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