mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added vec3Min/Max/Rcp.
This commit is contained in:
@@ -235,6 +235,27 @@ namespace bx
|
||||
return len;
|
||||
}
|
||||
|
||||
inline void vec3Min(float* __restrict _result, const float* __restrict _a, const float* __restrict _b)
|
||||
{
|
||||
_result[0] = fmin(_a[0], _b[0]);
|
||||
_result[1] = fmin(_a[1], _b[1]);
|
||||
_result[2] = fmin(_a[2], _b[2]);
|
||||
}
|
||||
|
||||
inline void vec3Max(float* __restrict _result, const float* __restrict _a, const float* __restrict _b)
|
||||
{
|
||||
_result[0] = fmax(_a[0], _b[0]);
|
||||
_result[1] = fmax(_a[1], _b[1]);
|
||||
_result[2] = fmax(_a[2], _b[2]);
|
||||
}
|
||||
|
||||
inline void vec3Rcp(float* __restrict _result, const float* __restrict _a)
|
||||
{
|
||||
_result[0] = 1.0f / _a[0];
|
||||
_result[1] = 1.0f / _a[1];
|
||||
_result[2] = 1.0f / _a[2];
|
||||
}
|
||||
|
||||
inline void quatIdentity(float* _result)
|
||||
{
|
||||
_result[0] = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user