Vector.dot
From GiderosMobile
Revision as of 10:19, 2 February 2026 by MoKaLux (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2026.1<br/> '''Class:''' vector library<br/> === Description === Computes the dot product of two vectors. <syntaxhighlight lang="...")
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