Skip to main content

OpenTD reference 2026 R1

Struct Dimensional<T\>

Last update: 09.03.2026

Namespace: 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.

[DataContract]
public struct Dimensional<T> where T : IDimension, new()

Type Parameters

T

Inherited Members

object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType()

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

double

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

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>

Returns

double

Connect with Ansys