Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Comparator ¶
func Comparator[T constraints.Ordered]() func(T, T) int
Comparator returns comparator of given type, where comparator is a function that takes two arguments and returns 0 if there are equal, -1 if first is less, 1 if first is greater.
func NearestPowerOf2 ¶
NearestPowerOf2 returns nearest power of 2 (k <= (1 << ans) < 2k). For non-positive numbers returns 0.
func SmallestValue ¶
func SmallestValue[T constraints.Ordered]() T
SmallestValue returns smallest possible value of given type.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.