Добавлена комбинация трёх версоров одной операцией
This commit is contained in:
parent
fcbec62024
commit
d2a25823a5
1 changed files with 68 additions and 0 deletions
|
|
@ -440,6 +440,74 @@ static inline void bg_fp64_versor_combine(const BgFP64Versor* second, const BgFP
|
|||
twin->x3 *= multiplier;
|
||||
}
|
||||
|
||||
// ============ Combination of three ============ //
|
||||
|
||||
static inline void bg_fp32_versor_combine3(const BgFP32Versor* third, const BgFP32Versor* second, const BgFP32Versor* first, BgFP32Versor* result)
|
||||
{
|
||||
const float s0a = (second->s0 * first->s0 - second->x1 * first->x1) - (second->x2 * first->x2 + second->x3 * first->x3);
|
||||
const float x1a = (second->x1 * first->s0 + second->s0 * first->x1) - (second->x3 * first->x2 - second->x2 * first->x3);
|
||||
const float x2a = (second->x2 * first->s0 + second->s0 * first->x2) - (second->x1 * first->x3 - second->x3 * first->x1);
|
||||