FREE TRIAL

|

☀
☾
struct

Length

A measurement represented as a fixed value or as a percentage.

Fields

Raw

The numeric value associated with this Length.

Type

The type of Length.

Static Fields

One

Fixed Length of 1.

Zero

Zero Length.

Properties

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%.

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

Create a new Value Length.

Percentage

Create a new Percent Length, 1 == 100%.

Constructors

Length(float, LengthType)

Construct a new Length.

Operators

Division(Length, float)

Division operator, divides lhs by rhs.

Division(float, Length)

Division operator, divides lhs by rhs.

Implicit(float to Length)

Converts a float, f to a Value Length.

Multiply(Length, float)

Multiplication operator, scales lhs by rhs.

Multiply(float, Length)

Multiplication operator, scales rhs by lhs.

UnaryNegation(Length)

Numeric negation operator, multiplies rhs by -1.

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