Небольшие исправления, а также добавление гомогенного трёхмерного вектора
This commit is contained in:
parent
03627f4401
commit
043cc72c81
25 changed files with 1686 additions and 1644 deletions
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_workspace_file>
|
||||
<Workspace title="Workspace">
|
||||
<Project filename="basic-geometry/basic-geometry.cbp" />
|
||||
<Project filename="basic-geometry-dev/basic-geometry-dev.cbp">
|
||||
<Depends filename="basic-geometry/basic-geometry.cbp" />
|
||||
</Project>
|
||||
<Project filename="basic-geometry-test/basic-geometry-test.cbp">
|
||||
<Depends filename="basic-geometry/basic-geometry.cbp" />
|
||||
</Project>
|
||||
<Project filename="basic-geometry/basic-geometry.cbp" />
|
||||
</Workspace>
|
||||
</CodeBlocks_workspace_file>
|
||||
|
|
|
|||
|
|
@ -51,186 +51,6 @@
|
|||
</Unit>
|
||||
<Unit filename="main.h" />
|
||||
<Unit filename="test_utilities.h" />
|
||||
<Unit filename="tests/complex.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/complex.h" />
|
||||
<Unit filename="tests/complex/complex_copy.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/complex/complex_copy.h" />
|
||||
<Unit filename="tests/complex/complex_is_unit.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/complex/complex_is_unit.h" />
|
||||
<Unit filename="tests/complex/complex_is_zero.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/complex/complex_is_zero.h" />
|
||||
<Unit filename="tests/complex/complex_modulus.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/complex/complex_modulus.h" />
|
||||
<Unit filename="tests/complex/complex_reset.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/complex/complex_reset.h" />
|
||||
<Unit filename="tests/complex/complex_set_values.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/complex/complex_set_values.h" />
|
||||
<Unit filename="tests/complex/complex_swap.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/complex/complex_swap.h" />
|
||||
<Unit filename="tests/quaternion.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/quaternion.h" />
|
||||
<Unit filename="tests/quaternion/quaternion_copy.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/quaternion/quaternion_copy.h" />
|
||||
<Unit filename="tests/quaternion/quaternion_is_unit.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/quaternion/quaternion_is_unit.h" />
|
||||
<Unit filename="tests/quaternion/quaternion_is_zero.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/quaternion/quaternion_is_zero.h" />
|
||||
<Unit filename="tests/quaternion/quaternion_modulus.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/quaternion/quaternion_modulus.h" />
|
||||
<Unit filename="tests/quaternion/quaternion_reset.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/quaternion/quaternion_reset.h" />
|
||||
<Unit filename="tests/quaternion/quaternion_set_to_identity.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/quaternion/quaternion_set_to_identity.h" />
|
||||
<Unit filename="tests/quaternion/quaternion_set_values.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/quaternion/quaternion_set_values.h" />
|
||||
<Unit filename="tests/quaternion/quaternion_swap.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/quaternion/quaternion_swap.h" />
|
||||
<Unit filename="tests/utilities.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/utilities.h" />
|
||||
<Unit filename="tests/utilities/are_close.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/utilities/are_close.h" />
|
||||
<Unit filename="tests/utilities/is_unit.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/utilities/is_unit.h" />
|
||||
<Unit filename="tests/utilities/is_zero.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/utilities/is_zero.h" />
|
||||
<Unit filename="tests/vector2.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector2.h" />
|
||||
<Unit filename="tests/vector2/vector2_copy.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector2/vector2_copy.h" />
|
||||
<Unit filename="tests/vector2/vector2_is_unit.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector2/vector2_is_unit.h" />
|
||||
<Unit filename="tests/vector2/vector2_is_zero.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector2/vector2_is_zero.h" />
|
||||
<Unit filename="tests/vector2/vector2_modulus.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector2/vector2_modulus.h" />
|
||||
<Unit filename="tests/vector2/vector2_reset.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector2/vector2_reset.h" />
|
||||
<Unit filename="tests/vector2/vector2_set_values.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector2/vector2_set_values.h" />
|
||||
<Unit filename="tests/vector2/vector2_swap.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector2/vector2_swap.h" />
|
||||
<Unit filename="tests/vector3.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector3.h" />
|
||||
<Unit filename="tests/vector3/vector3_copy.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector3/vector3_copy.h" />
|
||||
<Unit filename="tests/vector3/vector3_is_unit.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector3/vector3_is_unit.h" />
|
||||
<Unit filename="tests/vector3/vector3_is_zero.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector3/vector3_is_zero.h" />
|
||||
<Unit filename="tests/vector3/vector3_modulus.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector3/vector3_modulus.h" />
|
||||
<Unit filename="tests/vector3/vector3_reset.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector3/vector3_reset.h" />
|
||||
<Unit filename="tests/vector3/vector3_set_values.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector3/vector3_set_values.h" />
|
||||
<Unit filename="tests/vector3/vector3_swap.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/vector3/vector3_swap.h" />
|
||||
<Unit filename="tests/versor.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/versor.h" />
|
||||
<Unit filename="tests/versor/versor_are_close.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/versor/versor_are_close.h" />
|
||||
<Unit filename="tests/versor/versor_combine.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/versor/versor_combine.h" />
|
||||
<Unit filename="tests/versor/versor_copy.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/versor/versor_copy.h" />
|
||||
<Unit filename="tests/versor/versor_is_identity.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/versor/versor_is_identity.h" />
|
||||
<Unit filename="tests/versor/versor_reset.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/versor/versor_reset.h" />
|
||||
<Unit filename="tests/versor/versor_set_values.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/versor/versor_set_values.h" />
|
||||
<Unit filename="tests/versor/versor_swap.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="tests/versor/versor_swap.h" />
|
||||
<Unit filename="unity/unity.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
|
|
|||
|
|
@ -64,6 +64,14 @@
|
|||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="cotes-number.h" />
|
||||
<Unit filename="hg-vector3.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="hg-vector3.h" />
|
||||
<Unit filename="matrices.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="matrices.h" />
|
||||
<Unit filename="matrix2x2.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
|
@ -80,10 +88,6 @@
|
|||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="matrix3x3.h" />
|
||||
<Unit filename="matrixes.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="matrixes.h" />
|
||||
<Unit filename="position2.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ void bgc_fp32_complex_get_exponation(BGC_FP32_Complex* power, const BGC_FP32_Com
|
|||
{
|
||||
const float square_modulus = bgc_fp32_complex_get_square_modulus(base);
|
||||
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSYLON) {
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSILON) {
|
||||
power->real = 0.0f;
|
||||
power->imaginary = 0.0f;
|
||||
return;
|
||||
|
|
@ -110,7 +110,7 @@ void bgc_fp64_complex_get_exponation(BGC_FP64_Complex* power, const BGC_FP64_Com
|
|||
{
|
||||
const double square_modulus = bgc_fp64_complex_get_square_modulus(base);
|
||||
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSYLON) {
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSILON) {
|
||||
power->real = 0.0;
|
||||
power->imaginary = 0.0;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -70,12 +70,12 @@ inline double bgc_fp64_complex_get_modulus(const BGC_FP64_Complex* number)
|
|||
|
||||
inline int bgc_fp32_complex_is_zero(const BGC_FP32_Complex* number)
|
||||
{
|
||||
return bgc_fp32_complex_get_square_modulus(number) <= BGC_FP32_SQUARE_EPSYLON;
|
||||
return bgc_fp32_complex_get_square_modulus(number) <= BGC_FP32_SQUARE_EPSILON;
|
||||
}
|
||||
|
||||
inline int bgc_fp64_complex_is_zero(const BGC_FP64_Complex* number)
|
||||
{
|
||||
return bgc_fp64_complex_get_square_modulus(number) <= BGC_FP64_SQUARE_EPSYLON;
|
||||
return bgc_fp64_complex_get_square_modulus(number) <= BGC_FP64_SQUARE_EPSILON;
|
||||
}
|
||||
|
||||
inline int bgc_fp32_complex_is_unit(const BGC_FP32_Complex* number)
|
||||
|
|
@ -178,7 +178,7 @@ inline int bgc_fp32_complex_normalize(BGC_FP32_Complex* number)
|
|||
return 1;
|
||||
}
|
||||
|
||||