diff options
| author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2023-08-22 02:02:22 +0000 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2023-08-22 12:20:16 +0000 |
| commit | 91132985a7ff76db390949ac765113cfd3178fa7 (patch) | |
| tree | 9dcdece9df519c487f06e1b7a824c7ddd571ce53 /vendor/github.com/nbutton23/zxcvbn-go/utils/math/mathutils.go | |
| parent | 81191e0ae93e179f148ee4f89deedfe444d7baaa (diff) | |
mod: do: bump github.com/golangci/golangci-lint from 1.54.1 to 1.54.2
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.54.1 to 1.54.2.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.54.1...v1.54.2)
---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/nbutton23/zxcvbn-go/utils/math/mathutils.go')
| -rw-r--r-- | vendor/github.com/nbutton23/zxcvbn-go/utils/math/mathutils.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/vendor/github.com/nbutton23/zxcvbn-go/utils/math/mathutils.go b/vendor/github.com/nbutton23/zxcvbn-go/utils/math/mathutils.go deleted file mode 100644 index 1b989d194..000000000 --- a/vendor/github.com/nbutton23/zxcvbn-go/utils/math/mathutils.go +++ /dev/null @@ -1,40 +0,0 @@ -package zxcvbnmath - -import "math" - -/* -NChoseK http://blog.plover.com/math/choose.html -I am surprised that I have to define these. . . Maybe i just didn't look hard enough for a lib. -*/ -func NChoseK(n, k float64) float64 { - if k > n { - return 0 - } else if k == 0 { - return 1 - } - - var r float64 = 1 - - for d := float64(1); d <= k; d++ { - r *= n - r /= d - n-- - } - - return r -} - -// Round a number -func Round(val float64, roundOn float64, places int) (newVal float64) { - var round float64 - pow := math.Pow(10, float64(places)) - digit := pow * val - _, div := math.Modf(digit) - if div >= roundOn { - round = math.Ceil(digit) - } else { - round = math.Floor(digit) - } - newVal = round / pow - return -} |
