Skip to main content
Namespace: OpenTD.Utility
Assembly: OpenTD.dll
Utility methods for working with doubles.

Inheritance

object ← DoubleUtility

Inherited Members

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

Properties

PercentTolerance

Defaults to 0.1%

Property Value

double

Methods

AreEqual(double, double)

Determines whether two doubles are equal to within the static DoubleUtility.PercentTolerance.

Parameters

x1 double x2 double

Returns

bool

See Also

DoubleUtility.PercentTolerance

PercentDifference(double, double)

Determines the percent difference between two doubles. Handles NaN.

Parameters

x double y double

Returns

double