add import storage and test
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
package util
|
||||
|
||||
import "math"
|
||||
|
||||
func FloorDiv(a, b int32) int32 {
|
||||
return (a - ((a%b + b) % b)) / b
|
||||
}
|
||||
|
||||
func BpeByNum(x float64) uint8 {
|
||||
return uint8(math.Ceil(math.Log2(x)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user