mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 11:17:05 +02:00
feat: inputs
This commit is contained in:
1 parent
73f7e84192
commit
b40b7b2472
2 files changed
+75
-1
No files matched your search
@@ -0,0 +1,12 @@
|
||||
export function normalizeAngle180(angle: number) {
|
||||
const newAngle = angle % (2 * Math.PI);
|
||||
|
||||
if (newAngle > Math.PI) {
|
||||
return newAngle - 2 * Math.PI;
|
||||
}
|
||||
if (newAngle < -Math.PI) {
|
||||
return newAngle + 2 * Math.PI;
|
||||
}
|
||||
|
||||
return newAngle;
|
||||
}
|
||||
Reference in new issue
Block a user