mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Cleanup.
This commit is contained in:
@@ -499,6 +499,17 @@ namespace bx
|
||||
return sqrt(dot(_a, _a) );
|
||||
}
|
||||
|
||||
inline BX_CONST_FUNC float distanceSq(const Vec3 _a, const Vec3 _b)
|
||||
{
|
||||
const Vec3 ba = sub(_b, _a);
|
||||
return dot(ba, ba);
|
||||
}
|
||||
|
||||
inline BX_CONST_FUNC float distance(const Vec3 _a, const Vec3 _b)
|
||||
{
|
||||
return length(sub(_b, _a) );
|
||||
}
|
||||
|
||||
inline BX_CONSTEXPR_FUNC Vec3 lerp(const Vec3 _a, const Vec3 _b, float _t)
|
||||
{
|
||||
return
|
||||
|
||||
@@ -333,6 +333,12 @@ namespace bx
|
||||
///
|
||||
BX_CONST_FUNC float length(const Vec3 _a);
|
||||
|
||||
///
|
||||
BX_CONST_FUNC float distanceSq(const Vec3 _a, const Vec3 _b);
|
||||
|
||||
///
|
||||
BX_CONST_FUNC float distance(const Vec3 _a, const Vec3 _b);
|
||||
|
||||
///
|
||||
BX_CONSTEXPR_FUNC Vec3 lerp(const Vec3 _a, const Vec3 _b, float _t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user