mirror of
https://github.com/raysan5/raylib.git
synced 2026-05-09 07:12:05 +00:00
[raymath.h] Add missing (float * Vector) operator overloads (#5815)
This commit is contained in:
@@ -2802,6 +2802,11 @@ inline const Vector2& operator -= (Vector2& lhs, const Vector2& rhs)
|
||||
return lhs;
|
||||
}
|
||||
|
||||
inline Vector2 operator * (const float& lhs, const Vector2& rhs)
|
||||
{
|
||||
return Vector2Scale(rhs, lhs);
|
||||
}
|
||||
|
||||
inline Vector2 operator * (const Vector2& lhs, const float& rhs)
|
||||
{
|
||||
return Vector2Scale(lhs, rhs);
|
||||
@@ -2896,6 +2901,11 @@ inline const Vector3& operator -= (Vector3& lhs, const Vector3& rhs)
|
||||
return lhs;
|
||||
}
|
||||
|
||||
inline Vector3 operator * (const float& lhs, const Vector3& rhs)
|
||||
{
|
||||
return Vector3Scale(rhs, lhs);
|
||||
}
|
||||
|
||||
inline Vector3 operator * (const Vector3& lhs, const float& rhs)
|
||||
{
|
||||
return Vector3Scale(lhs, rhs);
|
||||
@@ -2991,6 +3001,11 @@ inline const Vector4& operator -= (Vector4& lhs, const Vector4& rhs)
|
||||
return lhs;
|
||||
}
|
||||
|
||||
inline Vector4 operator * (const float& lhs, const Vector4& rhs)
|
||||
{
|
||||
return Vector4Scale(rhs, lhs);
|
||||
}
|
||||
|
||||
inline Vector4 operator * (const Vector4& lhs, const float& rhs)
|
||||
{
|
||||
return Vector4Scale(lhs, rhs);
|
||||
|
||||
Reference in New Issue
Block a user