Тестирование производительности: версоры + матрица + поворот
This commit is contained in:
parent
5d4472150b
commit
a30629df67
3 changed files with 78 additions and 4 deletions
|
@ -7,6 +7,16 @@ const BgFP32Versor BG_FP32_IDLE_VERSOR = { 1.0f, 0.0f, 0.0f, 0.0f };
|
|||
|
||||
const BgFP64Versor BG_FP64_IDLE_VERSOR = { 1.0, 0.0, 0.0, 0.0 };
|
||||
|
||||
void __bg_fp32_versor_normalize(const float square_modulus, __BgFP32DarkTwinVersor* twin)
|
||||
{
|
||||
const float multiplier = sqrtf(1.0f / square_modulus);
|
||||
|
||||
twin->s0 *= multiplier;
|
||||
twin->x1 *= multiplier;
|
||||
twin->x2 *= multiplier;
|
||||
twin->x3 *= multiplier;
|
||||
}
|
||||
|
||||
// =============== Set Crude Turn =============== //
|
||||
|
||||
void bg_fp32_versor_set_crude_turn(const float x1, const float x2, const float x3, const float angle, const angle_unit_t unit, BgFP32Versor* result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue