helper: little module for helper functions
This commit is contained in:
5
src/helper.rs
Normal file
5
src/helper.rs
Normal 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))
|
||||
}
|
||||
Reference in New Issue
Block a user