FREE TRIAL

|

☀
☾
struct

Length3

A 3D Length.

Fields

X

The X-axis component of this 3D Length.

XY

The XY components of this 3D Length as a Length2.

Y

The Y-axis component of this 3D Length.

Z

The Z-axis component of this 3D Length.

Static Fields

One

A fixed Length3 set to One along all dimensions.

Zero

A fixed Length3 set to Zero along all dimensions.

Properties

Item[int]

Access each component by axis index.

Percent

get: If Type == Percent, returns Raw. Otherwise returns float.NaN.
set: Assigns Raw to the provided float value and assigns Type to Percent.

1 == 100%.

Raw

The numeric values associated with this Length3.

Type

The type of each Length. Tells the system how to interpret Raw per component.

Value

get: If Type == Value, returns Raw. Otherwise returns float.NaN.
set: Assigns Raw to the provided float value and assigns Type to Value.

Static Methods

FixedValue (2 overloads)
  1. Create a new Value Length3 from x, y, and z.
  2. Create a new Value Length3.
Percentage (2 overloads)
  1. Create a new Percent Length3 from x, y, and z.
  2. Create a new Percent Length3.

Constructors

Length3(Length, Length, Length)

Constructs a new Length3.

Length3(Length2, Length)

Constructs a new Length3 from a Length2 and z component.

Operators

Division(Length3, float)

Division operator, divides lhs by rhs.

Division(Length3, Vector3)

Division operator, divides lhs by rhs component-wise.

Division(float, Length3)

Division operator, divides lhs by rhs.

Division(Vector3, Length3)

Division operator, divides lhs by rhs component-wise.

Implicit(Length to Length3)

Constructs a new Length3 and assigns each component to the provided length.

Implicit(Length2 to Length3)

Constructs a new Length3 with the X and Y components assigned to lengths.X and lengths.Y, respectively, and the Z component to Zero.

Implicit(Vector3 to Length3)

Converts a UnityEngine.Vector3, v, into a Value Length3.

Multiply(Length3, float)

Multiplication operator, scales lhs by rhs.

Multiply(Length3, Vector3)

Multiplication operator, scales lhs by rhs component-wise.

Multiply(float, Length3)

Multiplication operator, scales rhs by lhs.

Multiply(Vector3, Length3)

Multiplication operator, scales rhs by lhs component-wise.

UnaryNegation(Length3)

Numeric negation operator, multiplies rhs by -1.

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