operator

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBitOnPosition

func CheckBitOnPosition(number, position int) bool
  1. 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)
  2. 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

Ternary returns a if condition is true, otherwise it returns b.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL