summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2020-11-10 14:30:02 -0500
committerAaron Franke <arnfranke@yahoo.com>2020-11-10 14:30:07 -0500
commitee79fc627c18d26221adeae2b641ba81ba662184 (patch)
tree1a131ddc44aaa01c3b639b879c4028a4b840a2b5 /modules/mono
parenta80ec80b57f419d84d196fb46dcb5f194c880001 (diff)
Minor clamp and float fixes
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
index 06bbe98497..bc0f81b2a7 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
@@ -221,8 +221,7 @@ namespace Godot
real_t dot = v1.Dot(v2);
- // Clamp dot to [-1, 1]
- dot = dot < -1.0f ? -1.0f : (dot > 1.0f ? 1.0f : dot);
+ dot = Mathf.Clamp(dot, -1.0f, 1.0f);
Vector2 v;