Browse Source

Minor additions

Panagiotis Christopoulos Charitos 4 years ago
parent
commit
c98aeafad7
2 changed files with 39 additions and 1 deletions
  1. 34 0
      AnKi/Math/Vec.h
  2. 5 1
      README.md

+ 34 - 0
AnKi/Math/Vec.h

@@ -2643,6 +2643,27 @@ public:
 		return *this;
 	}
 
+	ANKI_ENABLE_METHOD(IS_INTEGER)
+	TVec operator%(const TVec& b) const
+	{
+		TVec out;
+		for(U i = 0; i < N; i++)
+		{
+			out.m_carr[i] = m_carr[i] % b.m_carr[i];
+		}
+		return out;
+	}
+
+	ANKI_ENABLE_METHOD(IS_INTEGER)
+	TVec& operator%=(const TVec& b)
+	{
+		for(U i = 0; i < N; i++)
+		{
+			m_carr[i] %= b.m_carr[i];
+		}
+		return *this;
+	}
+
 	Bool operator==(const TVec& b) const
 	{
 		for(U i = 0; i < N; i++)
@@ -2820,6 +2841,19 @@ public:
 		return *this;
 	}
 
+	ANKI_ENABLE_METHOD(IS_INTEGER)
+	TVec operator%(const T f) const
+	{
+		return (*this) % TVec(f);
+	}
+
+	ANKI_ENABLE_METHOD(IS_INTEGER)
+	TVec& operator%=(const T f)
+	{
+		(*this) %= TVec(f);
+		return *this;
+	}
+
 	Bool operator==(const T f) const
 	{
 		return *this == TVec(f);

+ 5 - 1
README.md

@@ -1,6 +1,10 @@
 [![AnKi logo](http://anki3d.org/wp-content/uploads/2015/11/logo_248.png)](http://anki3d.org)
 
-AnKi 3D engine is a Linux, Windows and Android opensource game engine that runs on Vulkan 1.1 (with a few extensions).
+[**Official website:** anki3d.org](https://www.anki3d.org)
+
+[**Twitter development news feed:** twitter.com/anki3d](https://twitter.com/anki3d)
+
+**AnKi 3D engine** is a Linux, Windows and Android opensource game engine that runs on Vulkan.
 
 [![Video](http://img.youtube.com/vi/va7nZ2EFR4c/0.jpg)](http://www.youtube.com/watch?v=va7nZ2EFR4c)