Unity SDK Docs 1.5.0-beta.6
Loading...
Searching...
No Matches
TiltFive.Length Struct Reference

Public Member Functions

 Length (float value, LengthUnit unit)
float ConvertTo (LengthUnit unit)
 Converts the length to a value in the provided units.
double PreciselyConvertTo (LengthUnit unit)
 Converts the length to a double value in the provided units.

Static Public Member Functions

static float ConvertToMeters (float length, LengthUnit unit)
 Converts the provided length value to a value in meters.
static float ConvertMetersTo (float meters, LengthUnit unit)
 Converts the provided meter value to a value in the provided units.
static double PreciselyConvertMetersTo (double meters, LengthUnit unit)
 Converts the provided meter value to a double value in the provided units.
static Length operator* (Length a, float scalar)
 Multiplies a Length by some scalar value.
static Length operator+ (Length a, Length b)
 Adds two Length values together.
static Length operator- (Length a, Length b)
 Subtracts one Length value from another Length value.

Properties

float ToInches [get]
 The Length, converted to inches.
float ToFeet [get]
 The Length, converted to feet.
float ToYards [get]
 The Length, converted to yards.
float ToFurlongs [get]
 The Length, converted to furlongs.
float ToMiles [get]
 The Length, converted to miles.
float ToMillimeters [get]
 The Length, converted to millimeters.
float ToMegaBeardSeconds [get]
 The Length, converted to mega-beard-seconds.
float ToCentimeters [get]
 The Length, converted to centimeters.
float ToAttoparsecs [get]
 The Length, converted to attoparsecs.
float ToMeters [get]
 The Length, converted to meters.
float ToSmoots [get]
 The Length, converted to smoots.
float ToKilometers [get]
 The Length, converted to kilometers.

Detailed Description

Definition at line 41 of file Length.cs.

Constructor & Destructor Documentation

◆ Length()

TiltFive.Length.Length ( float value,
LengthUnit unit )
inline

Definition at line 129 of file Length.cs.

Member Function Documentation

◆ ConvertMetersTo()

float TiltFive.Length.ConvertMetersTo ( float meters,
LengthUnit unit )
inlinestatic

Converts the provided meter value to a value in the provided units.

Parameters
metersThe provided length in meters.
unitThe provided length units.
Returns
The length, in the provided units.

Definition at line 217 of file Length.cs.

◆ ConvertTo()

float TiltFive.Length.ConvertTo ( LengthUnit unit)
inline

Converts the length to a value in the provided units.

Parameters
unitThe provided length units.
Returns
The length, in the provided units.

Definition at line 139 of file Length.cs.

◆ ConvertToMeters()

float TiltFive.Length.ConvertToMeters ( float length,
LengthUnit unit )
inlinestatic

Converts the provided length value to a value in meters.

Parameters
lengthThe provided length.
unitThe provided length units.
Returns
The length, in meters.

Definition at line 164 of file Length.cs.

◆ operator*()

Length TiltFive.Length.operator* ( Length a,
float scalar )
static

Multiplies a Length by some scalar value.

Parameters
a
scalar
Returns

◆ operator+()

Length TiltFive.Length.operator+ ( Length a,
Length b )
static

Adds two Length values together.

Parameters
a
b
Returns

◆ operator-()

Length TiltFive.Length.operator- ( Length a,
Length b )
static

Subtracts one Length value from another Length value.

Parameters
a
b
Returns

◆ PreciselyConvertMetersTo()

double TiltFive.Length.PreciselyConvertMetersTo ( double meters,
LengthUnit unit )
inlinestatic

Converts the provided meter value to a double value in the provided units.

Parameters
metersThe provided length in meters.
unitThe provided length units.
Returns
The length, in the provided units.

Performs the conversion calculation using double arithmetic to reduce floating-point rounding errors. This may be less performant, so Drink Responsibly™. /remarks>

Definition at line 258 of file Length.cs.

◆ PreciselyConvertTo()

double TiltFive.Length.PreciselyConvertTo ( LengthUnit unit)
inline

Converts the length to a double value in the provided units.

Parameters
unitThe provided length units.
Returns
The length, in the provided units.

Performs the conversion calculation using double arithmetic to reduce floating-point rounding errors. This may be less performant, so Drink Responsibly™. /remarks>

Definition at line 153 of file Length.cs.

Property Documentation

◆ ToAttoparsecs

float TiltFive.Length.ToAttoparsecs
get

The Length, converted to attoparsecs.

Definition at line 89 of file Length.cs.

◆ ToCentimeters

float TiltFive.Length.ToCentimeters
get

The Length, converted to centimeters.

Definition at line 84 of file Length.cs.

◆ ToFeet

float TiltFive.Length.ToFeet
get

The Length, converted to feet.

Definition at line 54 of file Length.cs.

◆ ToFurlongs

float TiltFive.Length.ToFurlongs
get

The Length, converted to furlongs.

Definition at line 64 of file Length.cs.

◆ ToInches

float TiltFive.Length.ToInches
get

The Length, converted to inches.

Definition at line 49 of file Length.cs.

◆ ToKilometers

float TiltFive.Length.ToKilometers
get

The Length, converted to kilometers.

Definition at line 104 of file Length.cs.

◆ ToMegaBeardSeconds

float TiltFive.Length.ToMegaBeardSeconds
get

The Length, converted to mega-beard-seconds.

Definition at line 79 of file Length.cs.

◆ ToMeters

float TiltFive.Length.ToMeters
get

The Length, converted to meters.

Definition at line 94 of file Length.cs.

◆ ToMiles

float TiltFive.Length.ToMiles
get

The Length, converted to miles.

Definition at line 69 of file Length.cs.

◆ ToMillimeters

float TiltFive.Length.ToMillimeters
get

The Length, converted to millimeters.

Definition at line 74 of file Length.cs.

◆ ToSmoots

float TiltFive.Length.ToSmoots
get

The Length, converted to smoots.

Definition at line 99 of file Length.cs.

◆ ToYards

float TiltFive.Length.ToYards
get

The Length, converted to yards.

Definition at line 59 of file Length.cs.


The documentation for this struct was generated from the following file:
  • C:/Users/mail1/Documents/t5sw/sdk/unity/unity_package/Runtime/Utility/Length.cs