helper: little module for helper functions

This commit is contained in:
2026-04-02 05:18:32 +01:00
committed by oreodave
parent 04cf388f59
commit 9059047c79
2 changed files with 6 additions and 0 deletions

5
src/helper.rs Normal file
View File

@@ -0,0 +1,5 @@
use std::cmp::{max, min};
pub fn ordered<T: Ord + Copy>(x: T, y: T) -> (T, T) {
(min(x, y), max(x, y))
}