Converts a
CopyC#
float
value to a sortable signed
CopyC#
int
. The value is converted by getting their IEEE 754 floating-point "float format" bit layout and then some bits are swapped, to be able to compare the result as int. By this the precision is not reduced, but the value can easily used as an int.

Namespace: Lucene.Net.Util
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public static int FloatToSortableInt(
	float val
)
Visual Basic
Public Shared Function FloatToSortableInt ( _
	val As Single _
) As Integer
Visual C++
public:
static int FloatToSortableInt(
	float val
)

Parameters

val
Type: System..::..Single

[Missing <param name="val"/> documentation for "M:Lucene.Net.Util.NumericUtils.FloatToSortableInt(System.Single)"]

Return Value

[Missing <returns> documentation for "M:Lucene.Net.Util.NumericUtils.FloatToSortableInt(System.Single)"]

See Also