Struct Dimensional<T\>
Last update: 09.03.2026Namespace: OpenTD.Dimension
Assembly: OpenTD.dll
Dimensionals represent dimensional quantities, like endTime or initialTemperature. When set or get, dimensional values reflect the current Units.WorkingUnits system. For example, if you set WorkingUnits.temp to C, then set a Dimensional{Temperature} to 0, then set WorkingUnits.temp to F, the Dimensional would now return 32. Dimensionals implicitly convert to/from doubles.
[MessagePackObject(false, AllowPrivate = true)]
public struct Dimensional<T> where T : IDimension, new()
Type Parameters
T
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Dimensional(double)
public Dimensional(double x)
Parameters
x double
Dimensional(double, UnitsData)
public Dimensional(double x, UnitsData inputUnits)
Parameters
x double
inputUnits UnitsData
Methods
GetValueSI()
public double GetValueSI()
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
The fully qualified type name.
Operators
implicit operator Dimensional<T>(double)
public static implicit operator Dimensional<T>(double x)
Parameters
x double
Returns
Dimensional<T>
implicit operator double(Dimensional<T>)
public static implicit operator double(Dimensional<T> x)
Parameters
x Dimensional<T>