This commit is contained in:
2025-02-07 17:04:43 -06:00
parent 33fd7ddf72
commit 8eec81c7f4
2249 changed files with 75331 additions and 685 deletions

View File

@@ -0,0 +1,15 @@
'use strict';
import * as WEMath from 'WEMath';
export function angleVector2(angle) {
angle = angle * WEMath.deg2rad;
return new Vec2(
Math.cos(angle),
Math.sin(angle)
);
}
export function vectorAngle2(direction) {
return Math.atan2(direction.y, direction.x) * WEMath.rad2deg;
}