Skip to content

Commit

Permalink
std::math::big: add unary plus operator support to the Int
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Mar 12, 2024
1 parent 81a2d01 commit 4361b2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions std/math/big/int.jule
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ impl Int {
ret r
}

// Unary plus.
pub fn pos(self): Int {
ret clone(self)
}

// Reports whether number is odd.
pub fn odd(self): bool {
ret self.nat.odd()
Expand Down

0 comments on commit 4361b2d

Please sign in to comment.