浏览代码

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

Daniel Kauth 11 年之前
父节点
当前提交
63e5ee1670
共有 1 个文件被更改,包括 28 次插入0 次删除
  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];
+        }
+    }
+}