Table of Contents

Class LogarithmicUnit

Namespace
Cryville.Measure
Assembly
Cryville.Measure.dll
Logarithmic unit.
public record LogarithmicUnit : Unit, IEquatable<Unit>, IEquatable<LogarithmicUnit>
Inheritance
LogarithmicUnit
Implements
Inherited Members

Remarks

Scale and LogarithmicScale define the mapping to the coherent SI unit of the dimension. Given the value in the current unit x, the scale k, and the logarithmic scale a, the value in the coherent unit y = a * exp(k * x).

Constructors

LogarithmicUnit(Dimension, double, double)

Logarithmic unit.
public LogarithmicUnit(Dimension Dimension, double Scale = 1, double LogarithmicScale = 1)

Parameters

Dimension Dimension
The dimension.
Scale double
The scale.
LogarithmicScale double
The logarithmic scale.

Remarks

Scale and LogarithmicScale define the mapping to the coherent SI unit of the dimension. Given the value in the current unit x, the scale k, and the logarithmic scale a, the value in the coherent unit y = a * exp(k * x).

Properties

LogarithmicScale

The logarithmic scale.
public double LogarithmicScale { get; init; }

Property Value

double

Methods

FromCoherent(double)

Converts the specified value in the coherent unit to a value in the current unit.
public override double FromCoherent(double value)

Parameters

value double
The value in the coherent unit.

Returns

double
A value in the current unit.

ToCoherent(double)

Converts the specified value in the current unit to a value in the corresponding coherent unit.
public override double ToCoherent(double value)

Parameters

value double
The value in the current unit.

Returns

double
A value in the corresponding coherent unit.

ToString()

Returns a string that represents the current object.
public override string ToString()

Returns

string
A string that represents the current object.