Public Member Functions | |
Length (float value, LengthUnit unit) | |
float | ConvertTo (LengthUnit unit) |
Converts the length to a value in the provided units. More... | |
double | PreciselyConvertTo (LengthUnit unit) |
Converts the length to a double value in the provided units. More... | |
Static Public Member Functions | |
static float | ConvertToMeters (float length, LengthUnit unit) |
Converts the provided length value to a value in meters. More... | |
static float | ConvertMetersTo (float meters, LengthUnit unit) |
Converts the provided meter value to a value in the provided units. More... | |
static double | PreciselyConvertMetersTo (double meters, LengthUnit unit) |
Converts the provided meter value to a double value in the provided units. More... | |
static Length | operator* (Length a, float scalar) |
Multiplies a Length by some scalar value. More... | |
static Length | operator+ (Length a, Length b) |
Adds two Length values together. More... | |
static Length | operator- (Length a, Length b) |
Subtracts one Length value from another Length value. More... | |
Static Public Attributes | |
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 |
Properties | |
float | ToInches [get] |
The Length, converted to inches. More... | |
float | ToFeet [get] |
The Length, converted to feet. More... | |
float | ToYards [get] |
The Length, converted to yards. More... | |
float | ToFurlongs [get] |
The Length, converted to furlongs. More... | |
float | ToMiles [get] |
The Length, converted to miles. More... | |
float | ToMillimeters [get] |
The Length, converted to millimeters. More... | |
float | ToMegaBeardSeconds [get] |
The Length, converted to mega-beard-seconds. More... | |
float | ToCentimeters [get] |
The Length, converted to centimeters. More... | |
float | ToAttoparsecs [get] |
The Length, converted to attoparsecs. More... | |
float | ToMeters [get] |
The Length, converted to meters. More... | |
float | ToSmoots [get] |
The Length, converted to smoots. More... | |
float | ToKilometers [get] |
The Length, converted to kilometers. More... | |
Private Attributes | |
float | _meters |
Static Private Attributes | |
const float | METERS_TO_INCHES = 39.3701f |
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().
|
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().
|
static |
Definition at line 119 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
static |
Definition at line 118 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
static |
Definition at line 113 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
static |
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().
|
static |
Definition at line 121 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
static |
Definition at line 117 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
static |
Definition at line 116 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
static |
Definition at line 120 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
static |
Definition at line 114 of file Length.cs.
Referenced by TiltFive.Length.ConvertMetersTo(), TiltFive.Length.ConvertToMeters(), and TiltFive.Length.PreciselyConvertMetersTo().
|
static |
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 |
The Length, converted to meters.
Definition at line 94 of file Length.cs.
Referenced by TiltFive.GameBoard.GameboardExtents.GetCornerPositionInGameboardSpace(), TiltFive.GameBoard.GameboardExtents.GetEdgeCenterPositionInGameboardSpace(), and TiltFive.GameBoard.GameboardExtents.GetPhysicalCenterPositionInGameboardSpace().
|
get |
|
get |
|
get |
|
get |