isaacscript-common 84.2.3 → 84.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,7 +94,7 @@ exports.doesEntityExist = doesEntityExist;
94
94
  */
95
95
  function getClosestEntityTo(referenceEntity, entities, filterFunc) {
96
96
  let closestEntity;
97
- let closestDistance = math.huge;
97
+ let closestDistance = Number.POSITIVE_INFINITY;
98
98
  for (const entity of entities) {
99
99
  const distance = referenceEntity.Position.Distance(entity.Position);
100
100
  if (distance < closestDistance &&
@@ -95,7 +95,7 @@ exports.getCharacters = getCharacters;
95
95
  */
96
96
  function getClosestPlayer(position) {
97
97
  let closestPlayer;
98
- let closestDistance = math.huge;
98
+ let closestDistance = Number.POSITIVE_INFINITY;
99
99
  for (const player of (0, playerIndex_1.getPlayers)()) {
100
100
  const distance = position.Distance(player.Position);
101
101
  if (distance < closestDistance) {
@@ -125,7 +125,7 @@ exports.getFinalPlayer = getFinalPlayer;
125
125
  */
126
126
  function getNewestPlayer() {
127
127
  let newestPlayer;
128
- let lowestFrame = math.huge;
128
+ let lowestFrame = Number.POSITIVE_INFINITY;
129
129
  for (const player of (0, playerIndex_1.getPlayers)()) {
130
130
  if (player.FrameCount < lowestFrame) {
131
131
  newestPlayer = player;
@@ -57,7 +57,7 @@ exports.doesVectorHaveLength = doesVectorHaveLength;
57
57
  */
58
58
  function getClosestVectorTo(referenceVector, vectors) {
59
59
  let closestVector;
60
- let closestDistance = math.huge;
60
+ let closestDistance = Number.POSITIVE_INFINITY;
61
61
  for (const vector of vectors) {
62
62
  const distance = referenceVector.Distance(vector);
63
63
  if (distance < closestDistance) {
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 84.2.2
3
+ isaacscript-common 84.2.4
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6