IFloatingPoint<TSelf> 接口

定义

定义浮点类型。

generic <typename TSelf>
 where TSelf : IFloatingPoint<TSelf>public interface class IFloatingPoint : IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IComparisonOperators<TSelf, TSelf, bool>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IFloatingPointConstants<TSelf>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IModulusOperators<TSelf, TSelf, TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::INumber<TSelf>, System::Numerics::INumberBase<TSelf>, System::Numerics::ISignedNumber<TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
generic <typename TSelf>
 where TSelf : IFloatingPoint<TSelf>public interface class IFloatingPoint : IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, IUtf8SpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IComparisonOperators<TSelf, TSelf, bool>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IFloatingPointConstants<TSelf>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IModulusOperators<TSelf, TSelf, TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::INumber<TSelf>, System::Numerics::INumberBase<TSelf>, System::Numerics::ISignedNumber<TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
public interface IFloatingPoint<TSelf> : IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IComparisonOperators<TSelf,TSelf,bool>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IFloatingPointConstants<TSelf>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IModulusOperators<TSelf,TSelf,TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.INumber<TSelf>, System.Numerics.INumberBase<TSelf>, System.Numerics.ISignedNumber<TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : IFloatingPoint<TSelf>
public interface IFloatingPoint<TSelf> : IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, IUtf8SpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IComparisonOperators<TSelf,TSelf,bool>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IFloatingPointConstants<TSelf>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IModulusOperators<TSelf,TSelf,TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.INumber<TSelf>, System.Numerics.INumberBase<TSelf>, System.Numerics.ISignedNumber<TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : IFloatingPoint<TSelf>
type IFloatingPoint<'Self (requires 'Self :> IFloatingPoint<'Self>)> = interface
    interface IComparable
    interface IComparable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IEquatable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IFormattable
    interface IParsable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface ISpanFormattable
    interface ISpanParsable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IDecrementOperators<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IFloatingPointConstants<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface INumberBase<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IIncrementOperators<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface INumber<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface ISignedNumber<'Self (requires 'Self :> IFloatingPoint<'Self>)>
type IFloatingPoint<'Self (requires 'Self :> IFloatingPoint<'Self>)> = interface
    interface IComparable
    interface IComparable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IEquatable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IFormattable
    interface IParsable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface ISpanFormattable
    interface ISpanParsable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IDecrementOperators<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IFloatingPointConstants<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface INumberBase<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IIncrementOperators<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface INumber<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface ISignedNumber<'Self (requires 'Self :> IFloatingPoint<'Self>)>
type IFloatingPoint<'Self (requires 'Self :> IFloatingPoint<'Self>)> = interface
    interface IComparable
    interface IComparable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IEquatable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IFormattable
    interface IParsable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface ISpanFormattable
    interface ISpanParsable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IDecrementOperators<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IFloatingPointConstants<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IIncrementOperators<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface INumberBase<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self> and 'Self :> IFloatingPoint<'Self>)>
    interface INumber<'Self (requires 'Self :> IFloatingPoint<'Self>)>
    interface ISignedNumber<'Self (requires 'Self :> IFloatingPoint<'Self>)>
Public Interface IFloatingPoint(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IComparable(Of TSelf), IComparisonOperators(Of TSelf, TSelf, Boolean), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IFloatingPointConstants(Of TSelf), IIncrementOperators(Of TSelf), IModulusOperators(Of TSelf, TSelf, TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), INumber(Of TSelf), INumberBase(Of TSelf), IParsable(Of TSelf), ISignedNumber(Of TSelf), ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf)
Public Interface IFloatingPoint(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IComparable(Of TSelf), IComparisonOperators(Of TSelf, TSelf, Boolean), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IFloatingPointConstants(Of TSelf), IIncrementOperators(Of TSelf), IModulusOperators(Of TSelf, TSelf, TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), INumber(Of TSelf), INumberBase(Of TSelf), IParsable(Of TSelf), ISignedNumber(Of TSelf), ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf), IUtf8SpanParsable(Of TSelf)

类型参数

TSelf

实现 接口的类型。

派生
实现

方法

Ceiling(TSelf)

计算值的上限。

CompareTo(Object)

将当前实例与同一类型的另一个对象进行比较,并返回一个整数,该整数指示当前实例在排序顺序中的位置是位于另一个对象之前、之后还是与其位置相同。

(继承自 IComparable)
CompareTo(T)

将当前实例与同一类型的另一个对象进行比较,并返回一个整数,该整数指示当前实例在排序顺序中的位置是位于另一个对象之前、之后还是与其位置相同。

(继承自 IComparable<T>)
Equals(T)

指示当前对象是否等于同一类型的另一个对象。

(继承自 IEquatable<T>)
Floor(TSelf)

计算值下限。

GetExponentByteCount()

获取将作为 的一部分写入的 TryWriteExponentLittleEndian(Span<Byte>, Int32)字节数。

GetExponentShortestBitLength()

获取当前指数的最短两个补补表示形式的长度(以位为单位)。

GetSignificandBitLength()

获取当前有效值的长度(以位为单位)。

GetSignificandByteCount()

获取将作为 的一部分写入的 TryWriteSignificandLittleEndian(Span<Byte>, Int32)字节数。

Round(TSelf)

使用默认舍入模式 () ToEven 将值舍入到最接近的整数。

Round(TSelf, Int32)

使用默认舍入模式 () ToEven 将值舍入到指定数量的小数位数。

Round(TSelf, Int32, MidpointRounding)

使用指定的舍入模式将值舍入到指定数量的小数位数。

Round(TSelf, MidpointRounding)

使用指定的舍入模式将值舍入到最接近的整数。

ToString(String, IFormatProvider)

使用指定格式对当前实例的值设置格式。

(继承自 IFormattable)
Truncate(TSelf)

截断值。

TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider)

尝试将当前实例的值格式化为 UTF-8,将其设置为提供的字节范围。

(继承自 IUtf8SpanFormattable)
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

尝试将当前实例的值格式化为提供的字符范围。

(继承自 ISpanFormattable)
TryWriteExponentBigEndian(Span<Byte>, Int32)

尝试以大端格式将当前指数写入给定范围。

TryWriteExponentLittleEndian(Span<Byte>, Int32)

尝试以 little endian 格式将当前指数写入给定范围。

TryWriteSignificandBigEndian(Span<Byte>, Int32)

尝试以 big-endian 格式将当前有效值写入给定范围。

TryWriteSignificandLittleEndian(Span<Byte>, Int32)

尝试以 little-endian 格式将当前有效值写入给定范围。

WriteExponentBigEndian(Byte[])

以 big-endian 格式将当前指数写入给定数组。

WriteExponentBigEndian(Byte[], Int32)

以 big-endian 格式将当前指数写入给定数组。

WriteExponentBigEndian(Span<Byte>)

以 big-endian 格式将当前指数写入给定范围。

WriteExponentLittleEndian(Byte[])

以 little endian 格式将当前指数写入给定数组。

WriteExponentLittleEndian(Byte[], Int32)

以 little endian 格式将当前指数写入给定数组。

WriteExponentLittleEndian(Span<Byte>)

以 little endian 格式将当前指数写入给定范围。

WriteSignificandBigEndian(Byte[])

以 big-endian 格式将当前符号写入给定数组。

WriteSignificandBigEndian(Byte[], Int32)

以 big-endian 格式将当前符号写入给定数组。

WriteSignificandBigEndian(Span<Byte>)

以大端格式将当前有效值写入给定范围。

WriteSignificandLittleEndian(Byte[])

以 little endian 格式将当前有效值写入给定数组。

WriteSignificandLittleEndian(Byte[], Int32)

以 little endian 格式将当前有效值写入给定数组。

WriteSignificandLittleEndian(Span<Byte>)

以 little-endian 格式将当前有效值写入给定范围。

显式接口实现

IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider)

定义浮点类型。

(继承自 INumberBase<TSelf>)
IUtf8SpanParsable<TSelf>.Parse(ReadOnlySpan<Byte>, IFormatProvider)

将 UTF-8 字符范围分析为值。

(继承自 INumberBase<TSelf>)
IUtf8SpanParsable<TSelf>.TryParse(ReadOnlySpan<Byte>, IFormatProvider, TSelf)

尝试将 UTF-8 字符范围解析为值。

(继承自 INumberBase<TSelf>)

适用于