Drake's trivially copyable optimop

This commit is contained in:
Lirusaito
2019-04-11 05:02:43 -04:00
parent 7fc90d3dce
commit c9eac98d53
20 changed files with 52 additions and 65 deletions

View File

@@ -137,6 +137,8 @@ class LLVector4
friend LLVector4 operator-(const LLVector4 &a); // Return vector -a
};
static_assert(std::is_trivially_copyable<LLVector4>{}, "LLVector4 must be a trivially copyable type");
// Non-member functions
F32 angle_between(const LLVector4 &a, const LLVector4 &b); // Returns angle (radians) between a and b
BOOL are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel