vector.cross

vector.cross(vec1: vector, vec2: vector) : vector

Computes the cross product of two vectors.

Example

vector.cross(vector(1,1,1), vector(1,1,1))
{
  "def": "func",
  "name": "cross",
  "energy": 0,
  "pure": true,
  "sleep": 0,
  "signatures": [
    {
      "result": [
        {
          "name": "",
          "def": "result",
          "desc": "",
          "variadic": false,
          "type": [
            "vector"
          ],
          "optional": false
        }
      ],
      "args": [
        {
          "def": "arg",
          "name": "vec1",
          "desc": "",
          "type": [
            "vector"
          ],
          "variadic": false,
          "optional": false
        },
        {
          "def": "arg",
          "name": "vec2",
          "desc": "",
          "type": [
            "vector"
          ],
          "variadic": false,
          "optional": false
        }
      ]
    }
  ],
  "desc": "Computes the cross product of two vectors.",
  "link": "https://luau.org/library#bit32-library#:~:text=function%20bit32.cross"
}

< Back to vector