MCPcopy Index your code
hub / github.com/Shopify/go-lua / rotate

Function rotate

bit32.go:31–38  ·  view source on GitHub ↗
(l *State, i int)

Source from the content-addressed store, hash-verified

29}
30
31func rotate(l *State, i int) int {
32 r := trim(CheckUnsigned(l, 1))
33 if i &= bitCount - 1; i != 0 {
34 r = trim((r << uint(i)) | (r >> uint(bitCount-i)))
35 }
36 l.PushUnsigned(r)
37 return 1
38}
39
40func bitOp(l *State, init uint, f func(a, b uint) uint) uint {
41 r := init

Callers 1

bit32.goFile · 0.85

Calls 3

trimFunction · 0.85
CheckUnsignedFunction · 0.85
PushUnsignedMethod · 0.80

Tested by

no test coverage detected