bit32.btest

bit32.btest (...number) -> boolean

Perform a bitwise and of all input numbers, and return true if the result is not 0. If the function is called with no arguments, true is returned.

Example

bit32.btest(3.14)
Raw function spec json
{
  "def": "func",
  "name": "btest",
  "energy": 0,
  "must_use": true,
  "sleep": 0,
  "signatures": [
    {
      "def": "signature",
      "result": [
        {
          "name": "",
          "def": "result",
          "desc": "",
          "variadic": false,
          "type": [
            {
              "def": "simple",
              "value": "boolean"
            }
          ],
          "optional": false
        }
      ],
      "args": [
        {
          "def": "arg",
          "name": "args",
          "desc": "values to test together",
          "type": [
            {
              "def": "simple",
              "value": "number"
            }
          ],
          "variadic": true,
          "optional": false
        }
      ]
    }
  ],
  "desc": "Perform a bitwise and of all input numbers, and return `true` if the result is not `0`.\nIf the function is called with no arguments, `true` is returned.",
  "link": "https://luau.org/library#bit32-library#:~:text=function%20bit32.btest",
  "takesSelf": false,
  "private": false
}

< Back to bit32