浏览代码

added to2D()

Nicolas Cannasse 4 月之前
父节点
当前提交
088333928f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      h3d/Vector.hx

+ 4 - 0
h3d/Vector.hx

@@ -159,6 +159,10 @@ class VectorImpl #if apicheck implements h2d.impl.PointApi<Vector,Matrix> #end {
 		return new h3d.Vector4(x,y,z);
 	}
 
+	public inline function to2D() {
+		return new h2d.col.Point(x,y);
+	}
+
 	public function toString() {
 		return '{${x.fmt()},${y.fmt()},${z.fmt()}}';
 	}