Skip to main content

UnityEngine::VectorConversionExtensions

Provides extension methods for converting between Unity's Vector types and their double-precision equivalents.

Public Functions

Name
Vector2dToVector2d(this Vector2 vec)
Converts a Unity Vector2 to a double-precision Vector2d.
Vector3dToVector3d(this Vector3 vec)
Converts a Unity Vector3 to a double-precision Vector3d.
Vector3dToVector3d(this Vector4 vec)
Converts a Unity Vector4 to a double-precision Vector3d.
Vector2ToVector2(this Vector2d vec)
Converts a double-precision Vector2d to a Unity Vector2.
Vector3ToVector3(this Vector3d vec)
Converts a double-precision Vector3d to a Unity Vector3.

Public Functions Documentation

function ToVector2d

static Vector2d ToVector2d(
this Vector2 vec
)

Converts a Unity Vector2 to a double-precision Vector2d.

Parameters:

  • vec The Vector2 to convert.

Return: A double-precision Vector2d.

function ToVector3d

static Vector3d ToVector3d(
this Vector3 vec
)

Converts a Unity Vector3 to a double-precision Vector3d.

Parameters:

  • vec The Vector3 to convert.

Return: A double-precision Vector3d.

function ToVector3d

static Vector3d ToVector3d(
this Vector4 vec
)

Converts a Unity Vector4 to a double-precision Vector3d.

Parameters:

  • vec The Vector4 to convert.

Return: A double-precision Vector3d.

function ToVector2

static Vector2 ToVector2(
this Vector2d vec
)

Converts a double-precision Vector2d to a Unity Vector2.

Parameters:

  • vec The double-precision Vector2d to convert.

Return: A Unity Vector2.

function ToVector3

static Vector3 ToVector3(
this Vector3d vec
)

Converts a double-precision Vector3d to a Unity Vector3.

Parameters:

  • vec The double-precision Vector3d to convert.

Return: A Unity Vector3.