Nasal library/geo: Difference between revisions

Jump to navigation Jump to search
→‎Classes: Start geo.PositionedSearch
No edit summary
(→‎Classes: Start geo.PositionedSearch)
Line 14: Line 14:
{{Nasal doc
{{Nasal doc
|syntax = geo.Coord.new([coord]);
|syntax = geo.Coord.new([coord]);
|text = Constructor function. Returns a <code>geo.Coord</code> instance.
|text = Constructor function. Returns a new <code>geo.Coord</code> instance.
|param1 = coord
|param1 = coord
|param1text = An optional <code>geo.Coord</code> instance. If given, the returned instance will contain the values from this argument.
|param1text = An optional <code>geo.Coord</code> instance. If given, the returned instance will contain the values from this argument.
Line 283: Line 283:
}}
}}
==== new() ====
==== new() ====
==== condense() ====
{{Nasal doc
==== diff() ====
|syntax = geo.PositionedSearch.new(searchCmd, onAdded, onRemoved[, obj]);
|text = Constructor function. Returns a new <code>geo.PositionedSearch</code> instance.
|param1 = searchCmd
|param1text = A mandatory function that will actually do the searching. It must return a vector containing the elements from the search.
|param2 = onAdded
|param2text = A mandatory function that will be called if a element has been added to the search results. The element added will be passed to this function.
|param3 = onRemoved
|param3text = A mandatory function that will be called if a element has been removed from the search results. The element removed will be passed to this function.
|param4 = obj
|param4text = Optional <code>'''me'''</code> reference. This will be used as the <code>'''me'''</code> reference in each of the above fucntions.
|example1 =  
}}
==== test() ====
==== test() ====
{{Nasal doc
|syntax = geo.PositionedSearch.test([from[, to]]);
|text = Performs a test of the class. It benchmark's the amount of time it switch between searches for fixes at certain ranges.
|param1 = from
|param1text = Optional distance parameter in nautical miles for the first search for fixes. Defaults to 640.
|param2 = to
|param2text = Optional distance parameter in nautical miles for the second search for fixes. Defaults to 320.
|example1 = geo.PositionedSearch.test(); # prints the test results and changed elements
|example2 = geo.PositionedSearch.test(10, 50); # prints the test results and changed elements
}}
==== update() ====
==== update() ====
==== _equals ====


== Functions ==
== Functions ==

Navigation menu