summaryrefslogtreecommitdiff
path: root/Djup.Native/Types.cs
diff options
context:
space:
mode:
authorJoel Stålnacke <joel@saker.fi>2024-10-13 15:09:24 +0300
committerJoel Stålnacke <joel@saker.fi>2024-10-13 15:09:24 +0300
commit53f68bb7b0dce309723675c4b97f726a469031c0 (patch)
treebb156bf099abd5b054822bb7a0cc59cd1ec036c7 /Djup.Native/Types.cs
parent6a9b5df8b5ed811fbfde9c78f2599247751a650f (diff)
Added more math functions and sanity checks
No +/-Inf or NaN in my vectors please :)
Diffstat (limited to 'Djup.Native/Types.cs')
-rw-r--r--Djup.Native/Types.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Djup.Native/Types.cs b/Djup.Native/Types.cs
index 572277f..478208f 100644
--- a/Djup.Native/Types.cs
+++ b/Djup.Native/Types.cs
@@ -1,3 +1,4 @@
+using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Djup.Native;
@@ -10,6 +11,9 @@ public struct Vec2
public Vec2(float x, float y)
{
+ Debug.Assert(float.IsFinite(x));
+ Debug.Assert(float.IsFinite(y));
+
X = x;
Y = y;
}