Daniele Bartolini vor 9 Jahren
Ursprung
Commit
6f25bff488
3 geänderte Dateien mit 9 neuen und 0 gelöschten Zeilen
  1. 3 0
      src/core/math/vector2.h
  2. 3 0
      src/core/math/vector3.h
  3. 3 0
      src/core/math/vector4.h

+ 3 - 0
src/core/math/vector2.h

@@ -22,6 +22,7 @@ inline Vector2 vector2(f32 x, f32 y)
 	return v;
 }
 
+/// Adds the vector @a a to @a b and returns the result.
 inline Vector2& operator+=(Vector2& a, const Vector2& b)
 {
 	a.x += b.x;
@@ -29,6 +30,7 @@ inline Vector2& operator+=(Vector2& a, const Vector2& b)
 	return a;
 }
 
+/// Subtracts the vector @a b from @a a and returns the result.
 inline Vector2& operator-=(Vector2& a, const Vector2& b)
 {
 	a.x -= b.x;
@@ -36,6 +38,7 @@ inline Vector2& operator-=(Vector2& a, const Vector2& b)
 	return a;
 }
 
+/// Multiplies the vector @a a by the scalar @a k and returns the result.
 inline Vector2& operator*=(Vector2& a, f32 k)
 {
 	a.x *= k;

+ 3 - 0
src/core/math/vector3.h

@@ -23,6 +23,7 @@ inline Vector3 vector3(f32 x, f32 y, f32 z)
 	return v;
 }
 
+/// Adds the vector @a a to @a b and returns the result.
 inline Vector3& operator+=(Vector3& a, const Vector3& b)
 {
 	a.x += b.x;
@@ -31,6 +32,7 @@ inline Vector3& operator+=(Vector3& a, const Vector3& b)
 	return a;
 }
 
+/// Subtracts the vector @a b from @a a and returns the result.
 inline Vector3& operator-=(Vector3& a, const Vector3& b)
 {
 	a.x -= b.x;
@@ -39,6 +41,7 @@ inline Vector3& operator-=(Vector3& a, const Vector3& b)
 	return a;
 }
 
+/// Multiplies the vector @a a by the scalar @a k and returns the result.
 inline Vector3& operator*=(Vector3& a, f32 k)
 {
 	a.x *= k;

+ 3 - 0
src/core/math/vector4.h

@@ -24,6 +24,7 @@ inline Vector4 vector4(f32 x, f32 y, f32 z, f32 w)
 	return v;
 }
 
+/// Adds the vector @a a to @a b and returns the result.
 inline Vector4& operator+=(Vector4& a,	const Vector4& b)
 {
 	a.x += b.x;
@@ -33,6 +34,7 @@ inline Vector4& operator+=(Vector4& a,	const Vector4& b)
 	return a;
 }
 
+/// Subtracts the vector @a b from @a a and returns the result.
 inline Vector4& operator-=(Vector4& a,	const Vector4& b)
 {
 	a.x -= b.x;
@@ -42,6 +44,7 @@ inline Vector4& operator-=(Vector4& a,	const Vector4& b)
 	return a;
 }
 
+/// Multiplies the vector @a a by the scalar @a k and returns the result.
 inline Vector4& operator*=(Vector4& a, f32 k)
 {
 	a.x *= k;