vector.dot

vector.dot (vec1: vector, vec2: vector) -> number

Computes the dot product of two vectors.

Example

vector.dot(vector(1,1,1), vector(1,1,1))
Raw function spec json
{
  "def": "func",
  "name": "dot",
  "energy": 0,
  "must_use": true,
  "sleep": 0,
  "signatures": [
    {
      "def": "signature",
      "result": [
        {
          "name": "",
          "def": "result",
          "desc": "",
          "variadic": false,
          "type": [
            {
              "def": "simple",
              "value": "number"
            }
          ],
          "optional": false
        }
      ],
      "args": [
        {
          "def": "arg",
          "name": "vec1",
          "desc": "",
          "type": [
            {
              "def": "simple",
              "value": "vector"
            }
          ],
          "variadic": false,
          "optional": false
        },
        {
          "def": "arg",
          "name": "vec2",
          "desc": "",
          "type": [
            {
              "def": "simple",
              "value": "vector"
            }
          ],
          "variadic": false,
          "optional": false
        }
      ]
    }
  ],
  "desc": "Computes the dot product of two vectors.",
  "link": "https://luau.org/library#bit32-library#:~:text=function%20bit32.dot",
  "takesSelf": false,
  "private": false
}

< Back to vector