bit32.bxor

bit32.bxor(...(number)) : integer|number

Performs a bitwise xor (exclusive or) of all input numbers and returns the result. If the function is called with no arguments, 0 is returned.

Example

bit32.bxor(7)
{
  "def": "func",
  "name": "bxor",
  "energy": 0,
  "pure": true,
  "sleep": 0,
  "signatures": [
    {
      "result": [
        {
          "name": "",
          "def": "result",
          "desc": "",
          "variadic": false,
          "type": [
            "integer"
          ],
          "optional": false
        }
      ],
      "args": [
        {
          "def": "arg",
          "name": "args",
          "desc": "integers to xor together",
          "type": [
            "integer"
          ],
          "variadic": true,
          "optional": false
        }
      ]
    },
    {
      "result": [
        {
          "name": "",
          "def": "result",
          "desc": "",
          "variadic": false,
          "type": [
            "number"
          ],
          "optional": false
        }
      ],
      "args": [
        {
          "def": "arg",
          "name": "args",
          "desc": "numbers to xor together",
          "type": [
            "integer",
            "number"
          ],
          "variadic": true,
          "optional": false
        }
      ]
    }
  ],
  "desc": "Performs a bitwise xor (exclusive or) of all input numbers and returns the result.\nIf the function is called with no arguments, `0` is returned.",
  "link": "https://luau.org/library#bit32-library#:~:text=function%20bit32.bxor"
}

< Back to bit32