bit

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

README

bit GoDoc

Usage

local bit = require("bit")

local result, _ = bit.band(1, 0)
print(result)
-- Output: 0

local result, _ = bit.lshift(10, 5)
print(result)
-- Output: 320

Documentation

Overview

Package bit implements Go bitwise operations functionality for Lua.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bitwise

func Bitwise(kind op) lua.LGFunction

Bitwise returns a Lua function used for bitwise operations.

func Loader

func Loader(L *lua.LState) int

Loader is the module loader function.

func Not

func Not(l *lua.LState) int

Not implements bitwise not.

func Preload

func Preload(l *lua.LState)

Preload adds bit to the given Lua state's package.preload table. After it has been preloaded, it can be loaded using require:

local bit = require("bit")

Types

This section is empty.

Jump to

Keyboard shortcuts

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