This commit is contained in:
the me 2022-08-07 14:14:04 -07:00
commit 09ade10207
117 changed files with 2153 additions and 0 deletions

View file

@ -0,0 +1,19 @@
function dir2hv(dir_=direction, spd_=speed) {
//gml_pragma("forceinline")
//if dir && spd {
hspd = (dsin(dir_+90)%360)*spd_;
vspd = (dcos(dir_+90)%360)*spd_;
dir = 0;
spd = 0;
direction = 0;
speed = 0;
//}
}
function hv2dir(hspd, vspd) {
spd = (abs(hspd)+abs(vspd))/2;
dir = darctan2(hspd, vspd);
speed = spd;
direction = dir;
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "convenience",
"path": "folders/Scripts/convenience.yy",
},
"resourceVersion": "1.0",
"name": "dir2hv",
"tags": [],
"resourceType": "GMScript",
}