Добавлены функции swap, shorten и exclude для версоров / Functions swap, shorten and exclude have been added for versors
This commit is contained in:
parent
081f794eb1
commit
5d4472150b
3 changed files with 172 additions and 16 deletions
|
|
@ -231,7 +231,7 @@ static inline int bg_fp64_quaternion_normalize(BgFP64Quaternion* quaternion)
|
|||
|
||||
// ============ Make Rotation Matrix ============ //
|
||||
|
||||
void bg_fp32_quaternion_get_rotation_matrix(const BgFP32Quaternion* quaternion, BgFP32Matrix3x3* matrix)
|
||||
static inline void bg_fp32_quaternion_get_rotation_matrix(const BgFP32Quaternion* quaternion, BgFP32Matrix3x3* matrix)
|
||||
{
|
||||
const float s0s0 = quaternion->s0 * quaternion->s0;
|
||||
const float x1x1 = quaternion->x1 * quaternion->x1;
|
||||
|
|
@ -269,7 +269,7 @@ void bg_fp32_quaternion_get_rotation_matrix(const BgFP32Quaternion* quaternion,
|
|||
matrix->r1c3 = corrector2 * (x1x3 + s0x2);
|
||||
}
|
||||
|
||||
void bg_fp64_quaternion_get_rotation_matrix(const BgFP64Quaternion* quaternion, BgFP64Matrix3x3* matrix)
|
||||
static inline void bg_fp64_quaternion_get_rotation_matrix(const BgFP64Quaternion* quaternion, BgFP64Matrix3x3* matrix)
|
||||
{
|
||||
const double s0s0 = quaternion->s0 * quaternion->s0;
|
||||
const double x1x1 = quaternion->x1 * quaternion->x1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue