Skip to main content

OpenTD reference 2026 R1

Struct DimensionalIfPositive<T\>

Last update: 09.03.2026

Namespace: OpenTD.Dimension
Assembly: OpenTD.dll

Works like a dimensional, but only for positive values. Negative values act like doubles.

[DataContract]
public struct DimensionalIfPositive<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

DimensionalIfPositive(double)

public DimensionalIfPositive(double x)

Parameters

x double

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 DimensionalIfPositive<T>(double)

public static implicit operator DimensionalIfPositive<T>(double x)

Parameters

x double

Returns

DimensionalIfPositive<T>

implicit operator double(DimensionalIfPositive<T>)

public static implicit operator double(DimensionalIfPositive<T> x)

Parameters

x DimensionalIfPositive<T>

Returns

double

See Also

Dimensional<T>

Connect with Ansys