Vector.one: Difference between revisions

From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2026.1<br/> '''Class:''' vector library<br/> === Description === Constant vector with all components set to 1. Includes the fourt..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
Constant vector with all components set to 1. Includes the fourth component in 4-wide mode.
Constant vector with all components set to 1. Includes the fourth component in 4-wide mode.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
(table) = vector.one
(vector) = vector.one
</syntaxhighlight>
</syntaxhighlight>


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


=== Example ===
=== Example ===
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local v1 = vector.one
local v1 : vector = vector.one
print(v1) -- 1, 1, 1
print(v1) -- 1, 1, 1
</syntaxhighlight>
</syntaxhighlight>


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

Latest revision as of 09:07, 2 February 2026

Available since: Gideros 2026.1
Class: vector library

Description

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

(vector) = vector.one

Return values

Returns (vector) the vector with coordinates set to 1

Example

local v1 : vector = vector.one
print(v1) -- 1, 1, 1