float_sort

Crates.iofloat_sort
lib.rsfloat_sort
version0.1.0
created_at2025-08-26 12:12:17.744517+00
updated_at2025-08-26 12:12:17.744517+00
descriptionSimple crate to sort f32 and f64 vectors safely using total_cmp
homepage
repositoryhttps://github.com/wdcs-zaifmirza/float_sort
max_upload_size
id1811081
size3,520
wdcs-zaifmirza (wdcs-zaifmirza)

documentation

https://docs.rs/float_sort

README

float_sort

A lightweight Rust crate that provides easy and safe sorting for floating-point numbers (f64 and f32).
No more partial_cmp boilerplate, no more confusion with NaN handling — just simple sorting.


✨ Features

  • Sort Vec<f64> or Vec<f32> directly with a single method.
  • Uses total_cmp internally for consistent ordering.
  • Avoids panics and weird behavior with floating-point edge cases.
  • Zero dependencies, minimal and fast.

📦 Installation

Add this to your Cargo.toml:

[dependencies]
float_sort = "0.1.0"
Commit count: 2

cargo fmt