Исправление опечатки

This commit is contained in:
Andrey Pokidov 2025-06-05 02:05:52 +07:00
parent 880673a17a
commit 0dcd9c0d4d
2 changed files with 26 additions and 10 deletions

View file

@ -280,6 +280,22 @@ inline int bgc_matrix3x3_is_rotation_fp32(const BgcMatrix3x3FP32* matrix)
return 0; return 0;
} }
BgcMatrix3x3FP32 transposed, product;
bgc_matrix3x3_transpose_fp32(matrix, &transposed);
bgc_matrix_product_3x3_at_3x3_fp32(matrix, &transposed, &product);
return bgc_is_unit_fp32(product.r1c1) && bgc_is_zero_fp32(product.r1c2) && bgc_is_zero_fp32(product.r1c3)
&& bgc_is_zero_fp32(product.r2c1) && bgc_is_unit_fp32(product.r2c2) && bgc_is_zero_fp32(product.r2c3)
&& bgc_is_zero_fp32(product.r3c1) && bgc_is_zero_fp32(product.r3c2) && bgc_is_unit_fp32(product.r3c3);
}
inline int bgc_matrix3x3_is_rotation_fp32a(const BgcMatrix3x3FP32* matrix)
{
if (!bgc_is_unit_fp32(bgc_matrix3x3_get_determinant_fp32(matrix))) {
return 0;
}
const float product_r1c1 = matrix->r1c1 * matrix->r1c1 + matrix->r1c2 * matrix->r2c1 + matrix->r1c3 * matrix->r3c1; const float product_r1c1 = matrix->r1c1 * matrix->r1c1 + matrix->r1c2 * matrix->r2c1 + matrix->r1c3 * matrix->r3c1;
const float product_r1c2 = matrix->r1c1 * matrix->r1c2 + matrix->r1c2 * matrix->r2c2 + matrix->r1c3 * matrix->r3c2; const float product_r1c2 = matrix->r1c1 * matrix->r1c2 + matrix->r1c2 * matrix->r2c2 + matrix->r1c3 * matrix->r3c2;
const float product_r1c3 = matrix->r1c1 * matrix->r1c3 + matrix->r1c2 * matrix->r2c3 + matrix->r1c3 * matrix->r3c3; const float product_r1c3 = matrix->r1c1 * matrix->r1c3 + matrix->r1c2 * matrix->r2c3 + matrix->r1c3 * matrix->r3c3;

View file

Internal server error - Personal Git Server: Beyond coding. We Forge.

500

Internal server error

Forgejo version: 11.0.1+gitea-1.22.0

@ -40,17 +40,17 @@ void bgc_slerp_make_fp32(const BgcVersorFP32* start, const BgcVersorFP32* augmen
slerp->radians = atan2f(vector_modulus, augment->s0); slerp->radians = atan2f(vector_modulus, augment->s0);
const float mutliplier = 1.0f / vector_modulus; const float multiplier = 1.0f / vector_modulus;
slerp->s0_cos_weight = start->s0; slerp->s0_cos_weight = start->s0;
slerp->x1_cos_weight = start->x1; slerp->x1_cos_weight = start->x1;
slerp->x2_cos_weight = start->x2; slerp->x2_cos_weight = start->x2;
slerp->x3_cos_weight = start->x3; slerp->x3_cos_weight = start->x3;