diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2020-11-10 14:30:02 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2020-11-10 14:30:07 -0500 |
commit | ee79fc627c18d26221adeae2b641ba81ba662184 (patch) | |
tree | 1a131ddc44aaa01c3b639b879c4028a4b840a2b5 /modules/mono | |
parent | a80ec80b57f419d84d196fb46dcb5f194c880001 (diff) |
Minor clamp and float fixes
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs | 3 |
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; |