Browse Source

Fixed float comparison failing intermittently in Narrative test

master
chrisgregan 9 years ago
parent
commit
35d7ae2907
  1. 2
      Assets/Tests/Narrative/NarrativeTests.cs

2
Assets/Tests/Narrative/NarrativeTests.cs

@ -183,7 +183,7 @@ public class NarrativeTests : Command
{
Transform johnTransform = stage.transform.Find("Canvas/JohnCharacter");
if (johnTransform.localPosition.x == 0f)
if (Mathf.Approximately(johnTransform.localPosition.x, 0f))
{
Pass();
}

Loading…
Cancel
Save