MCPcopy Create free account
hub / github.com/BabylonJS/BabylonNative / insertNode

Function insertNode

Apps/BabylonScripts/meshwriter.min.js:5962–5976  ·  view source on GitHub ↗
(i, x, y, last)

Source from the content-addressed store, hash-verified

5960
5961 // create a node and optionally link it with previous one (in a circular doubly linked list)
5962 function insertNode(i, x, y, last) {
5963 var p = new Node(i, x, y);
5964
5965 if (!last) {
5966 p.prev = p;
5967 p.next = p;
5968
5969 } else {
5970 p.next = last.next;
5971 p.prev = last;
5972 last.next.prev = p;
5973 last.next = p;
5974 }
5975 return p;
5976 }
5977
5978 function removeNode(p) {
5979 p.next.prev = p.prev;

Callers 1

linkedListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected