mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added Vec3 mad.
This commit is contained in:
@@ -404,6 +404,11 @@ namespace bx
|
||||
};
|
||||
}
|
||||
|
||||
inline constexpr BX_CONST_FUNC Vec3 mad(const Vec3& _a, const Vec3& _b, const Vec3& _c)
|
||||
{
|
||||
return add(mul(_a, _b), _c);
|
||||
}
|
||||
|
||||
inline constexpr BX_CONST_FUNC float dot(const Vec3& _a, const Vec3& _b)
|
||||
{
|
||||
return _a.x*_b.x + _a.y*_b.y + _a.z*_b.z;
|
||||
|
||||
@@ -291,6 +291,9 @@ namespace bx
|
||||
///
|
||||
constexpr BX_CONST_FUNC Vec3 mul(const Vec3& _a, float _b);
|
||||
|
||||
///
|
||||
constexpr BX_CONST_FUNC Vec3 mad(const Vec3& _a, const Vec3& _b, const Vec3& _c);
|
||||
|
||||
///
|
||||
constexpr BX_CONST_FUNC float dot(const Vec3& _a, const Vec3& _b);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user