From 35d7ae2907b7f2af435added0c2dbe342f67b3a5 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 13 Aug 2015 12:50:21 +0100 Subject: [PATCH] Fixed float comparison failing intermittently in Narrative test --- Assets/Tests/Narrative/NarrativeTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Tests/Narrative/NarrativeTests.cs b/Assets/Tests/Narrative/NarrativeTests.cs index bf46e99f..fa408a6f 100644 --- a/Assets/Tests/Narrative/NarrativeTests.cs +++ b/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(); }