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. | |
Private Attributes | |
| float | _meters |
Static Private Attributes | |
| const float | METERS_TO_INCHES = 39.3701f |
| const float | METERS_TO_FEET = 3.28084f |
| const float | METERS_TO_YARDS = 1.0936f |
| const float | METERS_TO_FURLONGS = 0.004971f |
| const float | METERS_TO_MILLIMETERS = 1000f |
| const float | METERS_TO_MEGABEARDSECONDS = 200f |
| const float | METERS_TO_CENTIMETERS = 100f |
| const float | METERS_TO_ATTOPARSECS = 32.4078f |
| const float | METERS_TO_SMOOTS = 0.587613f |
| const float | METERS_TO_KILOMETERS = 0.001f |
| const float | MILES_TO_METERS = 1609.34f |
| TiltFive.Length.Length | ( | float | value, |
| LengthUnit | unit | ||
| ) |
Definition at line 129 of file Length.cs.
References TiltFive.Length._meters, and TiltFive.Length.ConvertToMeters().
|
static |
Converts the provided meter value to a value in the provided units.
| meters | The provided length in meters. |
| unit | The provided length units. |
Definition at line 217 of file Length.cs.
References TiltFive.Length.METERS_TO_ATTOPARSECS, TiltFive.Length.METERS_TO_CENTIMETERS, TiltFive.Length.METERS_TO_FEET, TiltFive.Length.METERS_TO_FURLONGS, TiltFive.Length.METERS_TO_INCHES, TiltFive.Length.METERS_TO_KILOMETERS, TiltFive.Length.METERS_TO_MEGABEARDSECONDS, TiltFive.Length.METERS_TO_MILLIMETERS, TiltFive.Length.METERS_TO_SMOOTS, TiltFive.Length.METERS_TO_YARDS, and TiltFive.Length.MILES_TO_METERS.
Referenced by TiltFive.Length.ConvertTo().
| float TiltFive.Length.ConvertTo | ( | LengthUnit | unit | ) |
Converts the length to a value in the provided units.
| unit | The provided length units. |
Definition at line 139 of file Length.cs.
References TiltFive.Length._meters, and TiltFive.Length.ConvertMetersTo().
|
static |
Converts the provided length value to a value in meters.
| length | The provided length. |
| unit | The provided length units. |
Definition at line 164 of file Length.cs.
References TiltFive.Length.METERS_TO_ATTOPARSECS, TiltFive.Length.METERS_TO_CENTIMETERS, TiltFive.Length.METERS_TO_FEET, TiltFive.Length.METERS_TO_FURLONGS, TiltFive.Length.METERS_TO_INCHES, TiltFive.Length.METERS_TO_KILOMETERS, TiltFive.Length.METERS_TO_MEGABEARDSECONDS, TiltFive.Length.METERS_TO_MILLIMETERS, TiltFive.Length.METERS_TO_SMOOTS, TiltFive.Length.METERS_TO_YARDS, and TiltFive.Length.MILES_TO_METERS.
Referenced by TiltFive.Length.Length().
Multiplies a Length by some scalar value.
| a | |
| scalar |
Adds two Length values together.
| a | |
| b |
Subtracts one Length value from another Length value.
| a | |
| b |
|
static |
Converts the provided meter value to a double value in the provided units.
| meters | The provided length in meters. |
| unit | The provided length 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.
References TiltFive.Length.METERS_TO_ATTOPARSECS, TiltFive.Length.METERS_TO_CENTIMETERS, TiltFive.Length.METERS_TO_FEET, TiltFive.Length.METERS_TO_FURLONGS, TiltFive.Length.METERS_TO_INCHES, TiltFive.Length.METERS_TO_KILOMETERS, TiltFive.Length.METERS_TO_MEGABEARDSECONDS, TiltFive.Length.METERS_TO_MILLIMETERS, TiltFive.Length.METERS_TO_SMOOTS, TiltFive.Length.METERS_TO_YARDS, and TiltFive.Length.MILES_TO_METERS.
Referenced by TiltFive.Length.PreciselyConvertTo().
| double TiltFive.Length.PreciselyConvertTo | ( | LengthUnit | unit | ) |
Converts the length to a double value in the provided units.
| unit | The provided length 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.
References TiltFive.Length._meters, and TiltFive.Length.PreciselyConvertMetersTo().
|
private |
Definition at line 111 of file Length.cs.
Referenced by TiltFive.Length.ConvertTo(), TiltFive.Length.Length(), and TiltFive.Length.PreciselyConvertTo().
|
staticprivate |
Definition at line 119 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 118 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 113 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 115 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 112 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 121 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 117 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 116 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 120 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 114 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
staticprivate |
Definition at line 122 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |