From c50ece109cdb29ab5d3fa7444040b546da7e360c Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Mon, 9 Oct 2023 16:15:48 -0500 Subject: factors: Give all exported members proper godoc --- factors/type.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'factors/type.go') diff --git a/factors/type.go b/factors/type.go index 33c48bd..91eb94e 100644 --- a/factors/type.go +++ b/factors/type.go @@ -41,7 +41,10 @@ var superabundantNums = [...]uint64{ 6133685312708553600, 9200527969062830400, 18401055938125660800, } -// A type of number (as determined by its factors) +// A classification of numbers, based on how many factors they have. +// Each type is a subset of the next (except [Practical] and [NotPractical]), +// so a number is only counted as its most exclusive type. +// The zero value of this type is invalid. type NumberType byte const ( @@ -64,6 +67,7 @@ const ( NotPractical NumberType = 0x40 ) +// Type determines the [NumberType] of a number. func Type(n uint) NumberType { if slices.Contains(colossallyAbundantNums[:], uint64(n)) { return ColossallyAbundant -- cgit v1.2.3