From 778220b2e3ce662e733727fb9a560fcfe85c19eb Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Wed, 30 Aug 2023 13:53:53 -0500 Subject: Add digit map calculation This is not in the output yet, but it will be soon - printing it is another task since I want colours in my output. --- factors/type.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'factors/type.go') diff --git a/factors/type.go b/factors/type.go index e587ebb..39aab9b 100644 --- a/factors/type.go +++ b/factors/type.go @@ -52,7 +52,7 @@ func Type(n uint32) NumberType { func isSAN(n uint32) bool { if n <= 2 { return true - } else if n % 4 != 0 && n % 6 != 0 { + } else if n%4 != 0 && n%6 != 0 { return false } @@ -77,7 +77,7 @@ func isSAN(n uint32) bool { func exponentsOrdered(n uint32) bool { if n <= 2 { return true - } else if n % 4 != 0 && n % 6 != 0 { + } else if n%4 != 0 && n%6 != 0 { return false } @@ -102,7 +102,7 @@ func exponentsOrdered(n uint32) bool { func practical(n uint32) bool { if n <= 2 { return true - } else if n % 4 != 0 && n % 6 != 0 { + } else if n%4 != 0 && n%6 != 0 { return false } @@ -126,11 +126,3 @@ func practical(n uint32) bool { return true } - -func uintpow(a, b uint) uint { - result := uint(1) - for i := uint(0); i < b; i++ { - result *= a - } - return result -} -- cgit v1.2.3