Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aosabook/500lines
/ vectorAtPoint
Function
vectorAtPoint
blockcode/code/gamelib/game.js:27–34 ·
view source on GitHub ↗
(x,y)
Source
from the content-addressed store, hash-verified
25
}
26
27
function
vectorAtPoint(x,y){
28
return
{
29
x: x,
30
y: y,
31
mag: sqrt(x*x + y*y),
32
rad: atan2(y,x)
33
};
34
}
35
36
// convert degrees to radians
37
function
deg2rad(deg){
Callers
6
onResize
Function · 0.85
wrap
Function · 0.85
bounce
Function · 0.85
limit
Function · 0.85
moveToX
Function · 0.85
moveToY
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected