File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,6 +106,22 @@ func (nm *NumberMethods) AndNot(x, y any) any {
106106 return bitOpsCast (x ) &^ bitOpsCast (y )
107107}
108108
109+ func (nm * NumberMethods ) Not (x any ) any {
110+ return ^ bitOpsCast (x )
111+ }
112+
113+ func (nm * NumberMethods ) Or (x , y any ) any {
114+ return bitOpsCast (x ) | bitOpsCast (y )
115+ }
116+
117+ func (nm * NumberMethods ) Xor (x , y any ) any {
118+ return bitOpsCast (x ) ^ bitOpsCast (y )
119+ }
120+
121+ func (nm * NumberMethods ) SetBit (x , y any ) any {
122+ return bitOpsCast (x ) | (1 << bitOpsCast (y ))
123+ }
124+
109125func IsZero (x any ) bool {
110126 return Ops (x ).IsZero (x )
111127}
@@ -146,10 +162,6 @@ func (nm *NumberMethods) ClearBit(x, y any) int64 {
146162 return bitOpsCast (x ) & ^ (1 << bitOpsCast (y ))
147163}
148164
149- func (nm * NumberMethods ) SetBit (x , y any ) int64 {
150- return bitOpsCast (x ) | (1 << bitOpsCast (y ))
151- }
152-
153165func (nm * NumberMethods ) ShiftLeft (x , y any ) int64 {
154166 x64 , y64 := bitOpsCast (x ), bitOpsCast (y )
155167 return x64 << (y64 & 0x3f )
You can’t perform that action at this time.
0 commit comments