[][src]Function tantivy::f64_to_u64

pub fn f64_to_u64(val: f64) -> u64

Maps a f64 to u64

For simplicity, tantivy internally handles f64 as u64. The mapping is defined by this function.

Maps f64 to u64 so that lexical order is preserved.

This is more suited than simply casting (val as u64) which would truncate the result

See also

The reverse mapping is u64_to_f64.