In This Article

FloatingPointNumberPart<T> Class

Represents a floating point numeric part that uses a format for text conversion and supports spinning.

public class FloatingPointNumberPart<T> : NumberPart<T>, ISpinnablePart<T?>, IPart where T : struct, IFloatingPoint<T>, IMinMaxValue<T>
Type Parameters:
T -

The part value type.

Inheritance:
object PartBase<T?> FormattedPartBase<T?> NumberPartBase<T> NumberPart<T> object
Derived:
FloatingPointIeee754NumberPart<T>
Implements:
ISpinnablePart<T?> IPart

Constructors

FloatingPointNumberPart(string?)

Initializes an instance of the class.

public FloatingPointNumberPart(string? format = null)
Parameter Type Description
format string

The numeric or composite format.

See Also

Methods

IncrementValue(T, T, bool, T, T, SpinWrapping, int, bool)

Increments a value.

protected override T IncrementValue(T value, T delta, bool isIncreasing, T minimum, T maximum, SpinWrapping spinWrapping, int roundingDecimalPlace, bool canSnapToChangePrecision)
Parameter Type Description
value T

The current value.

delta T

The value of the incremental change.

isIncreasing bool

true if the value should be increased by the delta; otherwise false to decrease the value by the delta.

minimum T

The minimum allowed value.

maximum T

The maximum allowed value.

spinWrapping SpinWrapping

The wrapping behavior used when spinning past a minimum or maximum value.

roundingDecimalPlace int

(For floating point numbers only) The rounding decimal place. Pass a negative number to disable rounding.

canSnapToChangePrecision bool

(For floating point numbers only) Whether the value should be snapped to the precision of the incremental change value prior to applying the increment.

Returns

T:

The incremented value.

See Also

Inherited Members

Extension Methods

See Also