Vector: Difference between revisions

Jump to navigation Jump to search
68 bytes added ,  9 January 2015
+-headings, +-first section: bolding page title
(Document API of of std.Vector)
 
(+-headings, +-first section: bolding page title)
Line 1: Line 1:
{{Template:Nasal Navigation}}
{{Template:Nasal Navigation}}


std.Vector provides an object-oriented way to use vectors in Nasal in FlightGear 3.3 or higher.
<tt>'''std.Vector'''</tt> provides an object-oriented way to use vectors in Nasal in FlightGear 3.3 or higher.


=== Creating a new vector ===
== Creating a new vector ==


A new empty Vector can be created as follows:
A new empty Vector can be created as follows:
Line 17: Line 17:
</syntaxhighlight>
</syntaxhighlight>


== Manipulating vector objects ==
=== Adding items ===
=== Adding items ===


Line 82: Line 83:
</syntaxhighlight>
</syntaxhighlight>


=== Querying the vector ===
== Querying vector objects ==


To query the size of the Vector, use size():
To query the size of the Vector, use size():
Line 111: Line 112:
</syntaxhighlight>
</syntaxhighlight>


=== Iteration ===
== Iteration using vector objects ==


In order to iterate over the items, you need to iterate over the wrapped Nasal vector itself:
In order to iterate over the items, you need to iterate over the wrapped Nasal vector itself:

Navigation menu