Browse Source

Added x(), y() and z() to Vector.

Daniel Kauth 11 years ago
parent
commit
63e5ee1670
1 changed files with 28 additions and 0 deletions
  1. 28 0
      bbiwarg/DataSource/VectorExtender.cs

+ 28 - 0
bbiwarg/DataSource/VectorExtender.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using MathNet.Numerics.LinearAlgebra.Single;
+
+namespace bbiwarg.DataSource
+{
+    public static class VectorExtender
+    {
+        public static float x(this Vector v)
+        {
+            return v[0];
+        }
+
+        public static float y(this Vector v)
+        {
+            return v[1];
+        }
+
+        public static float z(this Vector v)
+        {
+            return v[2];
+        }
+    }
+}