Skip to content

Commit fa78fee

Browse files
jrudermanbrson
authored andcommitted
Add uint::min
1 parent ea69f48 commit fa78fee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/uint.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ pred gt(uint x, uint y) -> bool { ret x > y; }
2424

2525
fn max(uint x, uint y) -> uint { if (x > y) { ret x; } ret y; }
2626

27+
fn min(uint x, uint y) -> uint { if (x > y) { ret y; } ret x; }
28+
2729
iter range(uint lo, uint hi) -> uint {
2830
auto lo_ = lo;
2931
while (lo_ < hi) { put lo_; lo_ += 1u; }

0 commit comments

Comments
 (0)