Vector.dot

From GiderosMobile

Available since: Gideros 2026.1
Class: vector library

Description

Computes the dot product of two vectors.

(number) = vector.dot(vec1,vec2)

Parameters

vec1: (vector) the first vector
vec2: (vector) the second vector

Return values

Returns (number) returns the dot product of the two vectors

Example

local vec1 : vector = vector.create(1, 2, 3)
local vec2 : vector  = vector.create(1, 1, 1)

local dot = vector.dot(vec1,vec2)
print(typeof(dot), dot) -- number	3