From b12070f982d6a7f672c2e14fbb0a2dbac5978e5b Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sat, 17 Aug 2024 20:52:41 +0100 Subject: [PATCH] Add ReadVec2 utility function --- project/code/LGS/Extensions.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/project/code/LGS/Extensions.cs b/project/code/LGS/Extensions.cs index b1df8d9..e4e7b83 100644 --- a/project/code/LGS/Extensions.cs +++ b/project/code/LGS/Extensions.cs @@ -9,4 +9,9 @@ public static class Extensions { return new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); } + + public static Vector2 ReadVec2(this BinaryReader reader) + { + return new Vector2(reader.ReadSingle(), reader.ReadSingle()); + } }