mirror of
https://github.com/rm-code/Graphoon.git
synced 2024-11-16 18:24:22 +00:00
Add function for checking if a node ID already exists
This commit is contained in:
parent
3adb350ca3
commit
436ec9f78f
@ -163,6 +163,14 @@ function Graph.new()
|
||||
func( edges, nodes );
|
||||
end
|
||||
|
||||
---
|
||||
-- Checks if a certain Node ID already exists.
|
||||
-- @param id - The id to check for.
|
||||
--
|
||||
function self:hasNode( id )
|
||||
return nodes[id] ~= nil;
|
||||
end
|
||||
|
||||
---
|
||||
-- Returns the node the id is pointing to.
|
||||
-- @param id - The id to check for.
|
||||
|
Loading…
Reference in New Issue
Block a user