MCPcopy Index your code
hub / github.com/ericdrowell/ElGrapho / getDirection

Function getDirection

engine/src/VertexBridge.js:84–90  ·  view source on GitHub ↗
(x0, y0, x1, y1)

Source from the content-addressed store, hash-verified

82 }
83
84 function getDirection(x0, y0, x1, y1) {
85 let vectorX = x1 - x0;
86 let vectorY = y1 - y0;
87 let vector = vec2.fromValues(vectorX, vectorY);
88
89 return vector;
90 }
91
92 function getNormal(x0, y0, x1, y1) {
93 let direction = getDirection(x0, y0, x1, y1);

Callers 2

getNormalFunction · 0.85
VertexBridge.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected