FREE TRIAL

|

☀
☾

Alignment.Explicit

Explicit(Alignment to Vector3)

Converts an Alignment to a Vector3.

Declaration
public static explicit operator Vector3(Alignment alignment)
Parameters
Type Name Description
Alignment alignment

The alignment to convert.

Returns
Type Description
Vector3

Left => -1
Center => 0
Right => 1

Bottom => -1
Center => 0
Top => 1

Front => -1
Center => 0
Back => 1

Explicit(Vector3 to Alignment)

Converts a Vector3 to an Alignment.

Declaration
public static explicit operator Alignment(Vector3 alignment)
Parameters
Type Name Description
Vector3 alignment

The alignment to convert.

Returns
Type Description
Alignment

alignment.x < 0 => Left
alignment.x == 0 => Center
alignment.x > 0 => Right

alignment.y < 0 => Bottom
alignment.y == 0 => Center
alignment.y > 0 => Top

alignment.z < 0 => Front
alignment.z == 0 => Center
alignment.z > 0 => Back

Explicit(Vector2 to Alignment)

Converts a Vector2 to an Alignment.

Declaration
public static explicit operator Alignment(Vector2 alignment)
Parameters
Type Name Description
Vector2 alignment

The alignment to convert.

Returns
Type Description
Alignment

alignment.x < 0 => Left
alignment.x == 0 => Center
alignment.x > 0 => Right

alignment.y < 0 => Bottom
alignment.y == 0 => Center
alignment.y > 0 => Top

alignment.z == 0 => Center

Explicit(Alignment to Vector2)

Converts an alignment to a Vector2.

Declaration
public static explicit operator Vector2(Alignment alignment)
Parameters
Type Name Description
Alignment alignment

The alignment to convert.

Returns
Type Description
Vector2

Left => -1
Center => 0
Right => 1

Bottom => -1
Center => 0
Top => 1

☀
☾
In This Article
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC