Skip to content

Commit c4bdb65

Browse files
midnightSuyamavalyard
authored andcommitted
Fix IsInvalidPosition
1 parent 889b455 commit c4bdb65

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Source/Assets/TouchScript/Scripts/TouchManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public override bool DebugMode
362362
/// <returns><c>true</c> if position is invalid; otherwise, <c>false</c>.</returns>
363363
public static bool IsInvalidPosition(Vector2 position)
364364
{
365-
return position.x == INVALID_POSITION.x && position.y == INVALID_POSITION.y;
365+
return float.IsNaN(position.x) && float.IsNaN(position.y);
366366
}
367367

368368
#endregion
@@ -610,4 +610,4 @@ private void frameFinishedUnityEventsHandler(object sender, EventArgs e)
610610

611611
#endregion
612612
}
613-
}
613+
}

0 commit comments

Comments
 (0)