UNPKG
@nxg-org/mineflayer-tracker
Version:
latest (1.3.2)
1.3.2
1.3.1
1.3.0
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.1
Provides functionality for more accurate entity and projectile tracking.
nxg-org/mineflayer-tracker
@nxg-org/mineflayer-tracker
/
lib
/
dist
/
util
/
mathUtil.js
9 lines
(8 loc)
•
246 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
exports
.
wrapDegrees
= wrapDegrees;
const
TWO_PI
=
2
*
Math
.
PI
;
function
wrapDegrees
(
degrees
) {
const
tmp = degrees %
360
;
return
tmp <
0
? tmp +
TWO_PI
: tmp; }