Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/DeepNotesApp/DeepNotes
/ distSqr
Method
distSqr
packages/@stdlib/misc/src/vec2.ts:64–66 ·
view source on GitHub ↗
(vec: Vec2)
Source
from the content-addressed store, hash-verified
62
return
this.divScalar(this.length());
63
}
64
distSqr(vec: Vec2): number {
65
return
this.sub(vec).sqr();
66
}
67
dist(vec: Vec2): number {
68
return
Math.sqrt(this.distSqr(vec));
69
}
Callers
2
dist
Method · 0.95
constructor
Method · 0.80
Calls
2
sub
Method · 0.95
sqr
Method · 0.80
Tested by
no test coverage detected