Skip to content

T_Cyjb_FloatComparer

CYJB edited this page Mar 20, 2024 · 13 revisions

FloatComparer 类

表示单精度浮点数的比较器。

继承层次

System.Object
  System.Collections.Generic.Comparer(Single)
    Cyjb.FloatComparer
Namespace: Cyjb
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public sealed class FloatComparer : Comparer<float>

The FloatComparer type exposes the following members.

构造函数

 

名称 说明
公共方法 FloatComparer 使用比较时要使用的精度,初始化 FloatComparer 类的新实例。
  Back to Top

属性

 

名称 说明
公共属性静态成员 Default 获取默认的单精度浮点数比较器。
  Back to Top

方法

 

名称 说明
公共方法 Compare 比较两个单精度浮点数并返回一个值,指示一个单精度浮点数是小于、等于还是大于另一个单精度浮点数。 (重写 Comparer(T).Compare(T, T).)
公共方法 Equals Determines whether the specified object is equal to the current object. (继承自 Object。)
公共方法 GetHashCode Serves as the default hash function. (继承自 Object。)
公共方法 GetType Gets the Type of the current instance. (继承自 Object。)
公共方法 ToString Returns a string that represents the current object. (继承自 Object。)
  Back to Top

字段

 

名称 说明
公共字段静态成员 DefaultEpsilon 比较时使用的默认精度。
  Back to Top

参见

Reference

Cyjb 命名空间

Clone this wiki locally