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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "84.2.3",
3
+ "version": "84.2.5",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -144,7 +144,7 @@ export function getClosestEntityTo<T extends AnyEntity>(
144
144
  filterFunc?: (entity: T) => boolean,
145
145
  ): T | undefined {
146
146
  let closestEntity: T | undefined;
147
- let closestDistance = math.huge;
147
+ let closestDistance = Number.POSITIVE_INFINITY;
148
148
  for (const entity of entities) {
149
149
  const distance = referenceEntity.Position.Distance(entity.Position);
150
150
 
@@ -116,7 +116,7 @@ export function getCharacters(): readonly PlayerType[] {
116
116
  */
117
117
  export function getClosestPlayer(position: Vector): EntityPlayer {
118
118
  let closestPlayer: EntityPlayer | undefined;
119
- let closestDistance = math.huge;
119
+ let closestDistance = Number.POSITIVE_INFINITY;
120
120
  for (const player of getPlayers()) {
121
121
  const distance = position.Distance(player.Position);
122
122
 
@@ -154,7 +154,7 @@ export function getFinalPlayer(): EntityPlayer {
154
154
  */
155
155
  export function getNewestPlayer(): EntityPlayer {
156
156
  let newestPlayer: EntityPlayer | undefined;
157
- let lowestFrame = math.huge;
157
+ let lowestFrame = Number.POSITIVE_INFINITY;
158
158
  for (const player of getPlayers()) {
159
159
  if (player.FrameCount < lowestFrame) {
160
160
  newestPlayer = player;
@@ -89,7 +89,7 @@ export function getClosestVectorTo(
89
89
  vectors: readonly Vector[],
90
90
  ): Vector | undefined {
91
91
  let closestVector: Vector | undefined;
92
- let closestDistance = math.huge;
92
+ let closestDistance = Number.POSITIVE_INFINITY;
93
93
  for (const vector of vectors) {
94
94
  const distance = referenceVector.Distance(vector);
95
95