Небольшие изменения в библиотеке геометрии и тестах
This commit is contained in:
parent
23fcdc2c28
commit
da61a9bf7c
5 changed files with 44 additions and 42 deletions
|
|
@ -7,7 +7,7 @@ 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 };
|
const BgFP64Versor BG_FP64_IDLE_VERSOR = { 1.0, 0.0, 0.0, 0.0 };
|
||||||
|
|
||||||
void __bg_fp32_versor_normalize(const float square_module, __BgFP32VersorDarkTwin* twin)
|
void __bg_fp32_versor_normalize(const float square_module, __BgFP32DarkTwinVersor* twin)
|
||||||
{
|
{
|
||||||
if (square_module <= BG_FP32_SQUARE_EPSYLON || (twin->x1 * twin->x1 + twin->x2 * twin->x2 + twin->x3 * twin->x3) <= BG_FP32_SQUARE_EPSYLON * square_module) {
|
if (square_module <= BG_FP32_SQUARE_EPSYLON || (twin->x1 * twin->x1 + twin->x2 * twin->x2 + twin->x3 * twin->x3) <= BG_FP32_SQUARE_EPSYLON * square_module) {
|
||||||
twin->s0 = 1.0f;
|
twin->s0 = 1.0f;
|
||||||
|
|
@ -25,7 +25,7 @@ void __bg_fp32_versor_normalize(const float square_module, __BgFP32VersorDarkTwi
|
||||||
twin->x3 /= module;
|
twin->x3 /= module;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __bg_fp64_versor_normalize(const double square_module, __BgFP64VersorDarkTwin* twin)
|
void __bg_fp64_versor_normalize(const double square_module, __BgFP64DarkTwinVersor* twin)
|
||||||
{
|
{
|
||||||