Исправление функций комбинации, добавление функций исключения одной позиции из другой
This commit is contained in:
parent
101df9f089
commit
e1dce83d63
7 changed files with 82 additions and 40 deletions
|
|
@ -352,7 +352,7 @@ void bgc_versor_get_exponation_fp64(const BgcVersorFP64* base, const double expo
|
|||
|
||||
// ================ Combination ================= //
|
||||
|
||||
inline void bgc_versor_combine_fp32(const BgcVersorFP32* second, const BgcVersorFP32* first, BgcVersorFP32* result)
|
||||
inline void bgc_versor_combine_fp32(const BgcVersorFP32* first, const BgcVersorFP32* second, BgcVersorFP32* result)
|
||||
{
|
||||
bgc_versor_set_values_fp32(
|
||||
(second->_s0 * first->_s0 - second->_x1 * first->_x1) - (second->_x2 * first->_x2 + second->_x3 * first->_x3),
|
||||
|
|
@ -363,7 +363,7 @@ inline void bgc_versor_combine_fp32(const BgcVersorFP32* second, const BgcVersor
|
|||
);
|
||||
}
|
||||
|
||||
inline void bgc_versor_combine_fp64(const BgcVersorFP64* second, const BgcVersorFP64* first, BgcVersorFP64* result)
|
||||
inline void bgc_versor_combine_fp64(const BgcVersorFP64* first, const BgcVersorFP64* second, BgcVersorFP64* result)
|
||||
{
|
||||
bgc_versor_set_values_fp64(
|
||||
(second->_s0 * first->_s0 - second->_x1 * first->_x1) - (second->_x2 * first->_x2 + second->_x3 * first->_x3),
|
||||
|
|
@ -376,7 +376,7 @@ inline void bgc_versor_combine_fp64(const BgcVersorFP64* second, const BgcVersor
|
|||
|
||||
// ============ Combination of three ============ //
|
||||
|
||||
inline void bgc_versor_combine3_fp32(const BgcVersorFP32* third, const BgcVersorFP32* second, const BgcVersorFP32* first, BgcVersorFP32* result)
|
||||
inline void bgc_versor_combine3_fp32(const BgcVersorFP32* first, const BgcVersorFP32* second, const BgcVersorFP32* third, BgcVersorFP32* result)
|
||||
{
|
||||
const float s0 = (second->_s0 * first->_s0 - second->_x1 * first->_x1) - (second->_x2 * first->_x2 + second->_x3 * first->_x3);
|
||||
const float x1 = (second->_x1 * first->_s0 + second->_s0 * first->_x1) - (second->_x3 * first->_x2 - second->_x2 * first->_x3);
|
||||
|
|
@ -392,7 +392,7 @@ inline void bgc_versor_combine3_fp32(const BgcVersorFP32* third, const BgcVersor
|
|||
);
|
||||
}
|
||||
|
||||
inline void bgc_versor_combine3_fp64(const BgcVersorFP64* third, const BgcVersorFP64* second, const BgcVersorFP64* first, BgcVersorFP64* result)
|
||||
inline void bgc_versor_combine3_fp64(const BgcVersorFP64* first, const BgcVersorFP64* second, const BgcVersorFP64* third, BgcVersorFP64* result)
|
||||
{
|
||||
const double s0 = (second->_s0 * first->_s0 - second->_x1 * first->_x1) - (second->_x2 * first->_x2 + second->_x3 * first->_x3);
|
||||
const double x1 = (second->_x1 * first->_s0 + second->_s0 * first->_x1) - (second->_x3 * first->_x2 - second->_x2 * first->_x3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue