Interface IFixedPointAmount<TSelf>
Self-referential fixed-point amount, so generic arithmetic can construct a result of the concrete type and read the type's fixed base statically.
public interface IFixedPointAmount<TSelf> : IFixedPointAmount, IAmount, IEquatable<TSelf>, IComparable<TSelf> where TSelf : IFixedPointAmount<TSelf>
Type Parameters
TSelfThe concrete implementing type.
- Inherited Members
Properties
BaseValue
The type's fixed base, usable in generic code without an instance. Mirrors the instance Base.
public static abstract int BaseValue { get; }
Property Value
Methods
Create(long, ulong, int)
Construct an instance from decomposed parts at the given precision.
public static abstract TSelf Create(long whole, ulong fraction, int precision)
Parameters
wholelongWhole part.
fractionulongFractional magnitude in
[0, Base^precision).precisionintNumber of fractional digits.
Returns
- TSelf