Example #1
0
 /// <summary>
 /// Encodes a <see cref="float"/> as a 4-byte <see cref="BytesRef"/>.
 /// <para/>
 /// NOTE: This was floatToBytesRef() in Lucene
 /// </summary>
 public static BytesRef SingleToBytesRef(float v)
 {
     return(Int32AssociationFacetField.Int32ToBytesRef(J2N.BitConversion.SingleToInt32Bits(v)));
 }
Example #2
0
 /// <summary>
 /// Encodes a <see cref="float"/> as a 4-byte <see cref="BytesRef"/>.
 /// <para/>
 /// NOTE: This was floatToBytesRef() in Lucene
 /// </summary>
 public static BytesRef SingleToBytesRef(float v)
 {
     return(Int32AssociationFacetField.Int32ToBytesRef(Support.Number.SingleToInt32Bits(v)));
 }