From 83067d4ec1e99717169abf5647119b822df5c4cb Mon Sep 17 00:00:00 2001 From: ZachCurtis <31259055+ZachCurtis@users.noreply.github.com> Date: Fri, 19 Jul 2024 19:53:01 -0400 Subject: [PATCH] Pass epsilon to Vector2:FuzzyEq() --- tests/roblox/datatypes/Vector2.luau | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/roblox/datatypes/Vector2.luau b/tests/roblox/datatypes/Vector2.luau index 83f81f24..523ba942 100644 --- a/tests/roblox/datatypes/Vector2.luau +++ b/tests/roblox/datatypes/Vector2.luau @@ -48,7 +48,8 @@ assert(Vector2.new(-1.7, 2):Sign() == Vector2.new(-1, 1)) assert(Vector2.new(-1.9, 2.1):Ceil() == Vector2.new(-1, 3)) assert(Vector2.new(-1.1, 2.99):Floor() == Vector2.new(-2, 2)) -assert(Vector2.new(1, 2):FuzzyEq(Vector2.new(1 - 1e-6, 2 + 1e-6))) +assert(Vector2.new(1, 2):FuzzyEq(Vector2.new(1 - 1e-6, 2 + 1e-6), 1e-5)) +assert(not Vector2.new(1, 2):FuzzyEq(Vector2.new(1.2, 2), 0.1)) local angle = Vector2.new(1, 1):Angle(Vector2.new(-1, 1)) assert(math.abs(angle - (math.pi / 2)) < 1e-5)