diff options
| author | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
| commit | 8db41da676ac8368ef7c2549d56239a5ff5eedde (patch) | |
| tree | 09c427fd66de2ec1ebffc8342f5fdbb84b0701b5 /vendor/github.com/dustin/go-humanize/big.go | |
| parent | d4f75fb6db22e57577867445a022227e70958931 (diff) | |
| download | gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.tar.gz gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.zip | |
Delete vendor directory
Diffstat (limited to 'vendor/github.com/dustin/go-humanize/big.go')
| -rw-r--r-- | vendor/github.com/dustin/go-humanize/big.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/vendor/github.com/dustin/go-humanize/big.go b/vendor/github.com/dustin/go-humanize/big.go deleted file mode 100644 index f49dc33..0000000 --- a/vendor/github.com/dustin/go-humanize/big.go +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | package humanize | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "math/big" | ||
| 5 | ) | ||
| 6 | |||
| 7 | // order of magnitude (to a max order) | ||
| 8 | func oomm(n, b *big.Int, maxmag int) (float64, int) { | ||
| 9 | mag := 0 | ||
| 10 | m := &big.Int{} | ||
| 11 | for n.Cmp(b) >= 0 { | ||
| 12 | n.DivMod(n, b, m) | ||
| 13 | mag++ | ||
| 14 | if mag == maxmag && maxmag >= 0 { | ||
| 15 | break | ||
| 16 | } | ||
| 17 | } | ||
| 18 | return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag | ||
| 19 | } | ||
| 20 | |||
| 21 | // total order of magnitude | ||
| 22 | // (same as above, but with no upper limit) | ||
| 23 | func oom(n, b *big.Int) (float64, int) { | ||
| 24 | mag := 0 | ||
| 25 | m := &big.Int{} | ||
| 26 | for n.Cmp(b) >= 0 { | ||
| 27 | n.DivMod(n, b, m) | ||
| 28 | mag++ | ||
| 29 | } | ||
| 30 | return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag | ||
| 31 | } | ||