Skip to content

Commit

Permalink
cherry pick: 3d27fac
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez committed Dec 18, 2023
1 parent 53295da commit 47b0907
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions math/int.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ func ZeroInt() Int { return Int{big.NewInt(0)} }
// OneInt returns Int value with one
func OneInt() Int { return Int{big.NewInt(1)} }

// ToDec converts Int to Dec
func (i Int) ToDec() LegacyDec {
return LegacyNewDecFromInt(i)
}

// Int64 converts Int to int64
// Panics if the value is out of range
func (i Int) Int64() int64 {
Expand Down

0 comments on commit 47b0907

Please sign in to comment.