mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-20 22:03:13 +01:00
Added vec3Add/Sub.
This commit is contained in:
@@ -173,6 +173,13 @@ namespace bx
|
||||
_result[2] = _a[2] + _b[2];
|
||||
}
|
||||
|
||||
inline void vec3Add(float* __restrict _result, const float* __restrict _a, float _b)
|
||||
{
|
||||
_result[0] = _a[0] + _b;
|
||||
_result[1] = _a[1] + _b;
|
||||
_result[2] = _a[2] + _b;
|
||||
}
|
||||
|
||||
inline void vec3Sub(float* __restrict _result, const float* __restrict _a, const float* __restrict _b)
|
||||
{
|
||||
_result[0] = _a[0] - _b[0];
|
||||
@@ -180,6 +187,13 @@ namespace bx
|
||||
_result[2] = _a[2] - _b[2];
|
||||
}
|
||||
|
||||
inline void vec3Sub(float* __restrict _result, const float* __restrict _a, float _b)
|
||||
{
|
||||
_result[0] = _a[0] - _b;
|
||||
_result[1] = _a[1] - _b;
|
||||
_result[2] = _a[2] - _b;
|
||||
}
|
||||
|
||||
inline void vec3Mul(float* __restrict _result, const float* __restrict _a, const float* __restrict _b)
|
||||
{
|
||||
_result[0] = _a[0] * _b[0];
|
||||
|
||||
Reference in New Issue
Block a user