Vector.zero: Difference between revisions

From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2026.1<br/> '''Class:''' vector<br/> === Description === Constant vector with all components set to 0. Includes the fourth compon..."
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''Available since:''' Gideros 2026.1<br/>
'''Available since:''' Gideros 2026.1<br/>
'''Class:''' [[vector]]<br/>
'''Class:''' [[vector library]]<br/>


=== Description ===
=== Description ===
Constant vector with all components set to 0. Includes the fourth component in 4-wide mode.
Constant vector with all components set to 0. Includes the fourth component in 4-wide mode.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
(table) = vector.zero
(vector) = vector.zero
</syntaxhighlight>
</syntaxhighlight>


=== Return values ===
=== Return values ===
'''Returns''' (table) the vector coordinates set to 0<br/>
'''Returns''' (vector) the vector with coordinates set to 0<br/>


=== Example ===
=== Example ===
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local v0 = vector.zero
local v0 : vector = vector.zero
print(v0) -- 0, 0, 0
print(v0) -- 0, 0, 0
</syntaxhighlight>
</syntaxhighlight>


{{(vector)}}
{{vector}}

Latest revision as of 09:06, 2 February 2026

Available since: Gideros 2026.1
Class: vector library

Description

Constant vector with all components set to 0. Includes the fourth component in 4-wide mode.

(vector) = vector.zero

Return values

Returns (vector) the vector with coordinates set to 0

Example

local v0 : vector = vector.zero
print(v0) -- 0, 0, 0