Skip to content

Commit 35894ef

Browse files
✨ feat(IntegerRing): Add draft implementation for min and max.
1 parent d8d35ac commit 35894ef

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/IntegerRing.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,12 @@ export class IntegerRing {
104104
return Number.isInteger(x) ;
105105
}
106106

107+
min ( a , b ) {
108+
return a.le(b) ? a : b ;
109+
}
110+
111+
max ( a , b ) {
112+
return a.ge(b) ? a : b ;
113+
}
114+
107115
}

0 commit comments

Comments
 (0)