Бранимир Караџић il y a 6 ans
Parent
commit
636871aa2f
2 fichiers modifiés avec 27 ajouts et 0 suppressions
  1. 18 0
      include/bx/inline/math.inl
  2. 9 0
      include/bx/math.h

+ 18 - 0
include/bx/inline/math.inl

@@ -361,6 +361,24 @@ namespace bx
 		memCopy(_ptr, &_a, sizeof(Ty) );
 		memCopy(_ptr, &_a, sizeof(Ty) );
 	}
 	}
 
 
+	inline Vec3::Vec3()
+	{
+	}
+
+	constexpr Vec3::Vec3(float _v)
+		: x(_v)
+		, y(_v)
+		, z(_v)
+	{
+	}
+
+	constexpr Vec3::Vec3(float _x, float _y, float _z)
+		: x(_x)
+		, y(_y)
+		, z(_z)
+	{
+	}
+
 	inline BX_CONSTEXPR_FUNC Vec3 round(const Vec3 _a)
 	inline BX_CONSTEXPR_FUNC Vec3 round(const Vec3 _a)
 	{
 	{
 		return
 		return

+ 9 - 0
include/bx/math.h

@@ -53,6 +53,15 @@ namespace bx
 	///
 	///
 	struct Vec3
 	struct Vec3
 	{
 	{
+		///
+		Vec3();
+
+		///
+		constexpr Vec3(float _v);
+
+		///
+		constexpr Vec3(float _x, float _y, float _z);
+
 		float x, y, z;
 		float x, y, z;
 	};
 	};