Реорганизация проекта

This commit is contained in:
Andrey Pokidov 2025-02-13 01:10:31 +07:00
parent f3b0232dd4
commit eb88fb2db4
5 changed files with 105 additions and 34 deletions

View file

@ -290,12 +290,12 @@ namespace BasicGeometry
public static void Combine(in VersorFP32 second, in VersorFP32 first, out VersorFP32 result)
{
float s0 = (second.s0 * first.s0 - second.x1 * first.x1) - (second.x2 * first.x2 + second.x3 * first.x3);
float x1 = (second.x1 * first.s0 + second.s0 * first.x1) - (second.x3 * first.x2 - second.x2 * first.x3);
float x2 = (second.x2 * first.s0 + second.s0 * first.x2) - (second.x1 * first.x3 - second.x3 * first.x1);
float x3 = (second.x3 * first.s0 + second.s0 * first.x3) - (second.x2 * first.x1 - second.x1 * first.x2);
float s0 = second.s0 * first.s0 - second.x1 * first.x1 - (second.x2 * first.x2 + second.x3 * first.x3);
float x1 = second.x1 * first.s0 + second.s0 * first.x1 - (second.x3 * first.x2 - second.x2 * first.x3);
float x2 = second.x2 * first.s0 + second.s0 * first.x2 - (second.x1 * first.x3 - second.x3 * first.x1);
float x3 = second.x3 * first.s0 + second.s0 * first.x3 - (second.x2 * first.x1 - second.x1 * first.x2);
float squareModule = (s0 * s0 + x1 * x1) + (x2 * x2 + x3 * x3);
float squareModule = s0 * s0 + x1 * x1 + (x2 * x2 + x3 * x3);
result.s0 = s0;
result.x1 = x1;
@ -323,7 +323,7 @@ namespace BasicGeometry
versor.x2 = x2;
versor.x3 = x3;
float squareModule = (s0 * s0 + x1 * x1) + (x2 * x2 + x3 * x3);
float squareModule = s0 * s0 + x1 * x1 + (x2 * x2 + x3 * x3);
if (!UtilityFP32.IsSqareValueUnit(squareModule))
{