Table of Contents

Interface IFixedPointAmount<TSelf>

Namespace
Virtufin.Core.Position
Assembly
Virtufin.Core.dll

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

TSelf

The 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

int

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

whole long

Whole part.

fraction ulong

Fractional magnitude in [0, Base^precision).

precision int

Number of fractional digits.

Returns

TSelf