Documentation
¶
Index ¶
Constants ¶
View Source
const (
MaxPower2 uint64 = 1 << (64 - 1)
)
Variables ¶
This section is empty.
Functions ¶
func HighestOneBit ¶ added in v0.0.17
HighestOneBit 返回大于等于 x 的最小 2 的幂次方. 特殊情况:
x = 0 → 返回 1<<63(可根据需求调整) x 是 2 的幂 → 直接返回 x
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.