Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBitOnPosition ¶
- Left shift given number 1 by position-1 to create a number that has only set bit as position-th bit. temp = 1 << (position-1)
- If bitwise AND of number and temp is non-zero, then result is SET else result is NOT SET.
func Ternary ¶
func Ternary[T comparable](condition bool, a, b T) T
Go Generics for Ternary function that returns the first value if the condition is true, and returns the second value if the condition is false
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.