Добавление квалификатора const для запрета изменения указаелей внутри функций

This commit is contained in:
Andrey Pokidov 2026-03-24 00:33:17 +07:00
parent 610756ffed
commit e6ac9023ec
24 changed files with 951 additions and 951 deletions

View file

@ -1,31 +1,31 @@
#include "./affine2.h" #include "./affine2.h"
extern inline void bgc_fp32_affine2_reset(BGC_FP32_Affine2* affine); extern inline void bgc_fp32_affine2_reset(BGC_FP32_Affine2* const affine);
extern inline void bgc_fp64_affine2_reset(BGC_FP64_Affine2* affine); extern inline void bgc_fp64_affine2_reset(BGC_FP64_Affine2* const affine);
extern inline void bgc_fp32_affine2_make(BGC_FP32_Affine2* affine, const BGC_FP32_Matrix2x2* distortion, const BGC_FP32_Vector2* shift); extern inline void bgc_fp32_affine2_make(BGC_FP32_Affine2* const affine, const BGC_FP32_Matrix2x2* const distortion, const BGC_FP32_Vector2* const shift);
extern inline void bgc_fp64_affine2_make(BGC_FP64_Affine2* affine, const BGC_FP64_Matrix2x2* distortion, const BGC_FP64_Vector2* shift); extern inline void bgc_fp64_affine2_make(BGC_FP64_Affine2* const affine, const BGC_FP64_Matrix2x2* const distortion, const BGC_FP64_Vector2* const shift);
extern inline void bgc_fp32_affine2_copy(BGC_FP32_Affine2* destination, const BGC_FP32_Affine2* source); extern inline void bgc_fp32_affine2_copy(BGC_FP32_Affine2* const destination, const BGC_FP32_Affine2* const source);
extern inline void bgc_fp64_affine2_copy(BGC_FP64_Affine2* destination, const BGC_FP64_Affine2* source); extern inline void bgc_fp64_affine2_copy(BGC_FP64_Affine2* const destination, const BGC_FP64_Affine2* const source);
extern inline void bgc_fp32_affine2_swap(BGC_FP32_Affine2* first, BGC_FP32_Affine2* second); extern inline void bgc_fp32_affine2_swap(BGC_FP32_Affine2* const first, BGC_FP32_Affine2* const second);
extern inline void bgc_fp64_affine2_swap(BGC_FP64_Affine2* first, BGC_FP64_Affine2* second); extern inline void bgc_fp64_affine2_swap(BGC_FP64_Affine2* const first, BGC_FP64_Affine2* const second);
extern inline void bgc_fp32_affine2_convert_to_fp64(BGC_FP64_Affine2* destination, const BGC_FP32_Affine2* source); extern inline void bgc_fp32_affine2_convert_to_fp64(BGC_FP64_Affine2* const destination, const BGC_FP32_Affine2* const source);
extern inline void bgc_fp64_affine2_convert_to_fp32(BGC_FP32_Affine2* destination, const BGC_FP64_Affine2* source); extern inline void bgc_fp64_affine2_convert_to_fp32(BGC_FP32_Affine2* const destination, const BGC_FP64_Affine2* const source);
extern inline int bgc_fp32_affine2_invert(BGC_FP32_Affine2* affine); extern inline int bgc_fp32_affine2_invert(BGC_FP32_Affine2* const affine);
extern inline int bgc_fp64_affine2_invert(BGC_FP64_Affine2* affine); extern inline int bgc_fp64_affine2_invert(BGC_FP64_Affine2* const affine);
extern inline int bgc_fp32_affine2_get_inverse(BGC_FP32_Affine2* inverse, const BGC_FP32_Affine2* affine); extern inline int bgc_fp32_affine2_get_inverse(BGC_FP32_Affine2* const inverse, const BGC_FP32_Affine2* const affine);
extern inline int bgc_fp64_affine2_get_inverse(BGC_FP64_Affine2* inverse, const BGC_FP64_Affine2* affine); extern inline int bgc_fp64_affine2_get_inverse(BGC_FP64_Affine2* const inverse, const BGC_FP64_Affine2* const affine);
extern inline void bgc_fp32_affine2_combine(BGC_FP32_Affine2* combination, const BGC_FP32_Affine2* first, const BGC_FP32_Affine2* second); extern inline void bgc_fp32_affine2_combine(BGC_FP32_Affine2* const combination, const BGC_FP32_Affine2* const first, const BGC_FP32_Affine2* const second);
extern inline void bgc_fp64_affine2_combine(BGC_FP64_Affine2* combination, const BGC_FP64_Affine2* first, const BGC_FP64_Affine2* second); extern inline void bgc_fp64_affine2_combine(BGC_FP64_Affine2* const combination, const BGC_FP64_Affine2* const first, const BGC_FP64_Affine2* const second);
extern inline void bgc_fp32_affine2_transform_point(BGC_FP32_Vector2* transformed_point, const BGC_FP32_Affine2* affine, const BGC_FP32_Vector2* initial_point); extern inline void bgc_fp32_affine2_transform_point(BGC_FP32_Vector2* const transformed_point, const BGC_FP32_Affine2* const affine, const BGC_FP32_Vector2* const initial_point);
extern inline void bgc_fp64_affine2_transform_point(BGC_FP64_Vector2* transformed_point, const BGC_FP64_Affine2* affine, const BGC_FP64_Vector2* initial_point); extern inline void bgc_fp64_affine2_transform_point(BGC_FP64_Vector2* const transformed_point, const BGC_FP64_Affine2* const affine, const BGC_FP64_Vector2* const initial_point);
extern inline void bgc_fp32_affine2_transform_vector(BGC_FP32_Vector2* transformed_vector, const BGC_FP32_Affine2* affine, const BGC_FP32_Vector2* initial_vector); extern inline void bgc_fp32_affine2_transform_vector(BGC_FP32_Vector2* const transformed_vector, const BGC_FP32_Affine2* const affine, const BGC_FP32_Vector2* const initial_vector);
extern inline void bgc_fp64_affine2_transform_vector(BGC_FP64_Vector2* transformed_vector, const BGC_FP64_Affine2* affine, const BGC_FP64_Vector2* initial_vector); extern inline void bgc_fp64_affine2_transform_vector(BGC_FP64_Vector2* const transformed_vector, const BGC_FP64_Affine2* const affine, const BGC_FP64_Vector2* const initial_vector);

View file

@ -7,13 +7,13 @@
// ==================== Reset ==================== // // ==================== Reset ==================== //
inline void bgc_fp32_affine2_reset(BGC_FP32_Affine2* affine) inline void bgc_fp32_affine2_reset(BGC_FP32_Affine2* const affine)
{ {
bgc_fp32_matrix2x2_make_identity(&affine->distortion); bgc_fp32_matrix2x2_make_identity(&affine->distortion);
bgc_fp32_vector2_reset(&affine->shift); bgc_fp32_vector2_reset(&affine->shift);
} }
inline void bgc_fp64_affine2_reset(BGC_FP64_Affine2* affine) inline void bgc_fp64_affine2_reset(BGC_FP64_Affine2* const affine)
{ {
bgc_fp64_matrix2x2_make_identity(&affine->distortion); bgc_fp64_matrix2x2_make_identity(&affine->distortion);
bgc_fp64_vector2_reset(&affine->shift); bgc_fp64_vector2_reset(&affine->shift);
@ -21,13 +21,13 @@ inline void bgc_fp64_affine2_reset(BGC_FP64_Affine2* affine)
// ==================== Make ===================== // // ==================== Make ===================== //
inline void bgc_fp32_affine2_make(BGC_FP32_Affine2* affine, const BGC_FP32_Matrix2x2* distortion, const BGC_FP32_Vector2* shift) inline void bgc_fp32_affine2_make(BGC_FP32_Affine2* const affine, const BGC_FP32_Matrix2x2* const distortion, const BGC_FP32_Vector2* const shift)
{ {
bgc_fp32_matrix2x2_copy(&affine->distortion, distortion); bgc_fp32_matrix2x2_copy(&affine->distortion, distortion);
bgc_fp32_vector2_copy(&affine->shift, shift); bgc_fp32_vector2_copy(&affine->shift, shift);
} }
inline void bgc_fp64_affine2_make(BGC_FP64_Affine2* affine, const BGC_FP64_Matrix2x2* distortion, const BGC_FP64_Vector2* shift) inline void bgc_fp64_affine2_make(BGC_FP64_Affine2* const affine, const BGC_FP64_Matrix2x2* const distortion, const BGC_FP64_Vector2* const shift)
{ {
bgc_fp64_matrix2x2_copy(&affine->distortion, distortion); bgc_fp64_matrix2x2_copy(&affine->distortion, distortion);
bgc_fp64_vector2_copy(&affine->shift, shift); bgc_fp64_vector2_copy(&affine->shift, shift);
@ -36,13 +36,13 @@ inline void bgc_fp64_affine2_make(BGC_FP64_Affine2* affine, const BGC_FP64_Matri
// ==================== Copy ===================== // // ==================== Copy ===================== //
inline void bgc_fp32_affine2_copy(BGC_FP32_Affine2* destination, const BGC_FP32_Affine2* source) inline void bgc_fp32_affine2_copy(BGC_FP32_Affine2* const destination, const BGC_FP32_Affine2* const source)
{ {
bgc_fp32_matrix2x2_copy(&destination->distortion, &source->distortion); bgc_fp32_matrix2x2_copy(&destination->distortion, &source->distortion);
bgc_fp32_vector2_copy(&destination->shift, &source->shift); bgc_fp32_vector2_copy(&destination->shift, &source->shift);
} }
inline void bgc_fp64_affine2_copy(BGC_FP64_Affine2* destination, const BGC_FP64_Affine2* source) inline void bgc_fp64_affine2_copy(BGC_FP64_Affine2* const destination, const BGC_FP64_Affine2* const source)
{ {
bgc_fp64_matrix2x2_copy(&destination->distortion, &source->distortion); bgc_fp64_matrix2x2_copy(&destination->distortion, &source->distortion);
bgc_fp64_vector2_copy(&destination->shift, &source->shift); bgc_fp64_vector2_copy(&destination->shift, &source->shift);
@ -50,13 +50,13 @@ inline void bgc_fp64_affine2_copy(BGC_FP64_Affine2* destination, const BGC_FP64_
// ==================== Swap ===================== // // ==================== Swap ===================== //
inline void bgc_fp32_affine2_swap(BGC_FP32_Affine2 * first, BGC_FP32_Affine2 * second) inline void bgc_fp32_affine2_swap(BGC_FP32_Affine2* const first, BGC_FP32_Affine2* const second)
{ {
bgc_fp32_matrix2x2_swap(&first->distortion, &second->distortion); bgc_fp32_matrix2x2_swap(&first->distortion, &second->distortion);
bgc_fp32_vector2_swap(&first->shift, &second->shift); bgc_fp32_vector2_swap(&first->shift, &second->shift);
} }
inline void bgc_fp64_affine2_swap(BGC_FP64_Affine2 * first, BGC_FP64_Affine2 * second) inline void bgc_fp64_affine2_swap(BGC_FP64_Affine2* const first, BGC_FP64_Affine2* const second)
{ {
bgc_fp64_matrix2x2_swap(&first->distortion, &second->distortion); bgc_fp64_matrix2x2_swap(&first->distortion, &second->distortion);
bgc_fp64_vector2_swap(&first->shift, &second->shift); bgc_fp64_vector2_swap(&first->shift, &second->shift);
@ -64,13 +64,13 @@ inline void bgc_fp64_affine2_swap(BGC_FP64_Affine2 * first, BGC_FP64_Affine2 * s
// =================== Convert =================== // // =================== Convert =================== //
inline void bgc_fp32_affine2_convert_to_fp64(BGC_FP64_Affine2* destination, const BGC_FP32_Affine2* source) inline void bgc_fp32_affine2_convert_to_fp64(BGC_FP64_Affine2* const destination, const BGC_FP32_Affine2* const source)
{ {
bgc_fp32_matrix2x2_convert_to_fp64(&destination->distortion, &source->distortion); bgc_fp32_matrix2x2_convert_to_fp64(&destination->distortion, &source->distortion);
bgc_fp32_vector2_convert_to_fp64(&destination->shift, &source->shift); bgc_fp32_vector2_convert_to_fp64(&destination->shift, &source->shift);
} }
inline void bgc_fp64_affine2_convert_to_fp32(BGC_FP32_Affine2* destination, const BGC_FP64_Affine2 * source) inline void bgc_fp64_affine2_convert_to_fp32(BGC_FP32_Affine2* const destination, const BGC_FP64_Affine2* const source)
{ {
bgc_fp64_matrix2x2_convert_to_fp32(&destination->distortion, &source->distortion); bgc_fp64_matrix2x2_convert_to_fp32(&destination->distortion, &source->distortion);
bgc_fp64_vector2_convert_to_fp32(&destination->shift, &source->shift); bgc_fp64_vector2_convert_to_fp32(&destination->shift, &source->shift);
@ -78,7 +78,7 @@ inline void bgc_fp64_affine2_convert_to_fp32(BGC_FP32_Affine2* destination, cons
// =================== Invert ==================== // // =================== Invert ==================== //
inline int bgc_fp32_affine2_invert(BGC_FP32_Affine2 * affine) inline int bgc_fp32_affine2_invert(BGC_FP32_Affine2* const affine)
{ {
if (bgc_fp32_matrix2x2_invert(&affine->distortion) != BGC_SUCCESS) { if (bgc_fp32_matrix2x2_invert(&affine->distortion) != BGC_SUCCESS) {
return BGC_FAILURE; return BGC_FAILURE;
@ -90,7 +90,7 @@ inline int bgc_fp32_affine2_invert(BGC_FP32_Affine2 * affine)
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_affine2_invert(BGC_FP64_Affine2 * affine) inline int bgc_fp64_affine2_invert(BGC_FP64_Affine2* const affine)
{ {
if (bgc_fp64_matrix2x2_invert(&affine->distortion) != BGC_SUCCESS) { if (bgc_fp64_matrix2x2_invert(&affine->distortion) != BGC_SUCCESS) {
return BGC_FAILURE; return BGC_FAILURE;
@ -104,7 +104,7 @@ inline int bgc_fp64_affine2_invert(BGC_FP64_Affine2 * affine)
// ================= Get Inverse ================= // // ================= Get Inverse ================= //
inline int bgc_fp32_affine2_get_inverse(BGC_FP32_Affine2* inverse, const BGC_FP32_Affine2 * affine) inline int bgc_fp32_affine2_get_inverse(BGC_FP32_Affine2* const inverse, const BGC_FP32_Affine2* const affine)
{ {
if (bgc_fp32_matrix2x2_get_inverse(&inverse->distortion, &affine->distortion) != BGC_SUCCESS) { if (bgc_fp32_matrix2x2_get_inverse(&inverse->distortion, &affine->distortion) != BGC_SUCCESS) {
return BGC_FAILURE; return BGC_FAILURE;
@ -116,7 +116,7 @@ inline int bgc_fp32_affine2_get_inverse(BGC_FP32_Affine2* inverse, const BGC_FP3
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_affine2_get_inverse(BGC_FP64_Affine2* inverse, const BGC_FP64_Affine2 * affine) inline int bgc_fp64_affine2_get_inverse(BGC_FP64_Affine2* const inverse, const BGC_FP64_Affine2* const affine)
{ {
if (bgc_fp64_matrix2x2_get_inverse(&inverse->distortion, &affine->distortion) != BGC_SUCCESS) { if (bgc_fp64_matrix2x2_get_inverse(&inverse->distortion, &affine->distortion) != BGC_SUCCESS) {
return BGC_FAILURE; return BGC_FAILURE;
@ -130,7 +130,7 @@ inline int bgc_fp64_affine2_get_inverse(BGC_FP64_Affine2* inverse, const BGC_FP6
// =================== Combine =================== // // =================== Combine =================== //
inline void bgc_fp32_affine2_combine(BGC_FP32_Affine2* combination, const BGC_FP32_Affine2 * first, const BGC_FP32_Affine2 * second) inline void bgc_fp32_affine2_combine(BGC_FP32_Affine2* const combination, const BGC_FP32_Affine2* const first, const BGC_FP32_Affine2* const second)
{ {
BGC_FP32_Vector2 first_shift; BGC_FP32_Vector2 first_shift;
bgc_fp32_matrix2x2_multiply_by_vector2(&first_shift, &second->distortion, &first->shift); bgc_fp32_matrix2x2_multiply_by_vector2(&first_shift, &second->distortion, &first->shift);
@ -138,7 +138,7 @@ inline void bgc_fp32_affine2_combine(BGC_FP32_Affine2* combination, const BGC_FP
bgc_fp32_vector2_add(&combination->shift, &second->shift, &first_shift); bgc_fp32_vector2_add(&combination->shift, &second->shift, &first_shift);
} }
inline void bgc_fp64_affine2_combine(BGC_FP64_Affine2* combination, const BGC_FP64_Affine2 * first, const BGC_FP64_Affine2 * second) inline void bgc_fp64_affine2_combine(BGC_FP64_Affine2* const combination, const BGC_FP64_Affine2* const first, const BGC_FP64_Affine2* const second)
{ {
BGC_FP64_Vector2 first_shift; BGC_FP64_Vector2 first_shift;
bgc_fp64_matrix2x2_multiply_by_vector2(&first_shift, &second->distortion, &first->shift); bgc_fp64_matrix2x2_multiply_by_vector2(&first_shift, &second->distortion, &first->shift);
@ -148,14 +148,14 @@ inline void bgc_fp64_affine2_combine(BGC_FP64_Affine2* combination, const BGC_FP
// =============== Transform Point =============== // // =============== Transform Point =============== //
inline void bgc_fp32_affine2_transform_point(BGC_FP32_Vector2* transformed_point, const BGC_FP32_Affine2 * affine, const BGC_FP32_Vector2 * initial_point) inline void bgc_fp32_affine2_transform_point(BGC_FP32_Vector2* const transformed_point, const BGC_FP32_Affine2* const affine, const BGC_FP32_Vector2* const initial_point)
{ {
BGC_FP32_Vector2 distorted; BGC_FP32_Vector2 distorted;
bgc_fp32_matrix2x2_multiply_by_vector2(&distorted, &affine->distortion, initial_point); bgc_fp32_matrix2x2_multiply_by_vector2(&distorted, &affine->distortion, initial_point);
bgc_fp32_vector2_add(transformed_point, &affine->shift, &distorted); bgc_fp32_vector2_add(transformed_point, &affine->shift, &distorted);
} }
inline void bgc_fp64_affine2_transform_point(BGC_FP64_Vector2* transformed_point, const BGC_FP64_Affine2 * affine, const BGC_FP64_Vector2 * initial_point) inline void bgc_fp64_affine2_transform_point(BGC_FP64_Vector2* const transformed_point, const BGC_FP64_Affine2* const affine, const BGC_FP64_Vector2* const initial_point)
{ {
BGC_FP64_Vector2 distorted; BGC_FP64_Vector2 distorted;
bgc_fp64_matrix2x2_multiply_by_vector2(&distorted, &affine->distortion, initial_point); bgc_fp64_matrix2x2_multiply_by_vector2(&distorted, &affine->distortion, initial_point);
@ -164,12 +164,12 @@ inline void bgc_fp64_affine2_transform_point(BGC_FP64_Vector2* transformed_point
// ============== Transform Vector =============== // // ============== Transform Vector =============== //
inline void bgc_fp32_affine2_transform_vector(BGC_FP32_Vector2* transformed_vector, const BGC_FP32_Affine2 * affine, const BGC_FP32_Vector2 * initial_vector) inline void bgc_fp32_affine2_transform_vector(BGC_FP32_Vector2* const transformed_vector, const BGC_FP32_Affine2* const affine, const BGC_FP32_Vector2* const initial_vector)
{ {
bgc_fp32_matrix2x2_multiply_by_vector2(transformed_vector, &affine->distortion, initial_vector); bgc_fp32_matrix2x2_multiply_by_vector2(transformed_vector, &affine->distortion, initial_vector);
} }
inline void bgc_fp64_affine2_transform_vector(BGC_FP64_Vector2* transformed_vector, const BGC_FP64_Affine2 * affine, const BGC_FP64_Vector2 * initial_vector) inline void bgc_fp64_affine2_transform_vector(BGC_FP64_Vector2* const transformed_vector, const BGC_FP64_Affine2* const affine, const BGC_FP64_Vector2* const initial_vector)
{ {
bgc_fp64_matrix2x2_multiply_by_vector2(transformed_vector, &affine->distortion, initial_vector); bgc_fp64_matrix2x2_multiply_by_vector2(transformed_vector, &affine->distortion, initial_vector);
} }

View file

@ -1,31 +1,31 @@
#include "./affine3.h" #include "./affine3.h"
extern inline void bgc_fp32_affine3_reset(BGC_FP32_Affine3* affine); extern inline void bgc_fp32_affine3_reset(BGC_FP32_Affine3* const affine);
extern inline void bgc_fp64_affine3_reset(BGC_FP64_Affine3* affine); extern inline void bgc_fp64_affine3_reset(BGC_FP64_Affine3* const affine);
extern inline void bgc_fp32_affine3_make(BGC_FP32_Affine3* affine, const BGC_FP32_Matrix3x3* distortion, const BGC_FP32_Vector3* shift); extern inline void bgc_fp32_affine3_make(BGC_FP32_Affine3* const affine, const BGC_FP32_Matrix3x3* const distortion, const BGC_FP32_Vector3* const shift);
extern inline void bgc_fp64_affine3_make(BGC_FP64_Affine3* affine, const BGC_FP64_Matrix3x3* distortion, const BGC_FP64_Vector3* shift); extern inline void bgc_fp64_affine3_make(BGC_FP64_Affine3* const affine, const BGC_FP64_Matrix3x3* const distortion, const BGC_FP64_Vector3* const shift);
extern inline void bgc_fp32_affine3_copy(BGC_FP32_Affine3* destination, const BGC_FP32_Affine3* source); extern inline void bgc_fp32_affine3_copy(BGC_FP32_Affine3* const destination, const BGC_FP32_Affine3* const source);
extern inline void bgc_fp64_affine3_copy(BGC_FP64_Affine3* destination, const BGC_FP64_Affine3* source); extern inline void bgc_fp64_affine3_copy(BGC_FP64_Affine3* const destination, const BGC_FP64_Affine3* const source);
extern inline void bgc_fp32_affine3_swap(BGC_FP32_Affine3* first, BGC_FP32_Affine3* second); extern inline void bgc_fp32_affine3_swap(BGC_FP32_Affine3* const first, BGC_FP32_Affine3* const second);
extern inline void bgc_fp64_affine3_swap(BGC_FP64_Affine3* first, BGC_FP64_Affine3* second); extern inline void bgc_fp64_affine3_swap(BGC_FP64_Affine3* const first, BGC_FP64_Affine3* const second);
extern inline void bgc_fp32_affine3_convert_to_fp64(BGC_FP64_Affine3* destination, const BGC_FP32_Affine3* source); extern inline void bgc_fp32_affine3_convert_to_fp64(BGC_FP64_Affine3* const destination, const BGC_FP32_Affine3* const source);
extern inline void bgc_fp64_affine3_convert_to_fp32(BGC_FP32_Affine3* destination, const BGC_FP64_Affine3* source); extern inline void bgc_fp64_affine3_convert_to_fp32(BGC_FP32_Affine3* const destination, const BGC_FP64_Affine3* const source);
extern inline int bgc_fp32_affine3_invert(BGC_FP32_Affine3* affine); extern inline int bgc_fp32_affine3_invert(BGC_FP32_Affine3* const affine);
extern inline int bgc_fp64_affine3_invert(BGC_FP64_Affine3* affine); extern inline int bgc_fp64_affine3_invert(BGC_FP64_Affine3* const affine);
extern inline int bgc_fp32_affine3_get_inverse(BGC_FP32_Affine3* inverse, const BGC_FP32_Affine3* affine); extern inline int bgc_fp32_affine3_get_inverse(BGC_FP32_Affine3* const inverse, const BGC_FP32_Affine3* const affine);
extern inline int bgc_fp64_affine3_get_inverse(BGC_FP64_Affine3* inverse, const BGC_FP64_Affine3* affine); extern inline int bgc_fp64_affine3_get_inverse(BGC_FP64_Affine3* const inverse, const BGC_FP64_Affine3* const affine);
extern inline void bgc_fp32_affine3_combine(BGC_FP32_Affine3* combination, const BGC_FP32_Affine3* first, const BGC_FP32_Affine3* second); extern inline void bgc_fp32_affine3_combine(BGC_FP32_Affine3* const combination, const BGC_FP32_Affine3* const first, const BGC_FP32_Affine3* const second);
extern inline void bgc_fp64_affine3_combine(BGC_FP64_Affine3* combination, const BGC_FP64_Affine3* first, const BGC_FP64_Affine3* second); extern inline void bgc_fp64_affine3_combine(BGC_FP64_Affine3* const combination, const BGC_FP64_Affine3* const first, const BGC_FP64_Affine3* const second);
extern inline void bgc_fp32_affine3_transform_point(BGC_FP32_Vector3* transformed_point, const BGC_FP32_Affine3* affine, const BGC_FP32_Vector3* initial_point); extern inline void bgc_fp32_affine3_transform_point(BGC_FP32_Vector3* const transformed_point, const BGC_FP32_Affine3* const affine, const BGC_FP32_Vector3* const initial_point);
extern inline void bgc_fp64_affine3_transform_point(BGC_FP64_Vector3* transformed_point, const BGC_FP64_Affine3* affine, const BGC_FP64_Vector3* initial_point); extern inline void bgc_fp64_affine3_transform_point(BGC_FP64_Vector3* const transformed_point, const BGC_FP64_Affine3* const affine, const BGC_FP64_Vector3* const initial_point);
extern inline void bgc_fp32_affine3_transform_vector(BGC_FP32_Vector3* transformed_vector, const BGC_FP32_Affine3* affine, const BGC_FP32_Vector3* initial_vector); extern inline void bgc_fp32_affine3_transform_vector(BGC_FP32_Vector3* const transformed_vector, const BGC_FP32_Affine3* const affine, const BGC_FP32_Vector3* const initial_vector);
extern inline void bgc_fp64_affine3_transform_vector(BGC_FP64_Vector3* transformed_vector, const BGC_FP64_Affine3* affine, const BGC_FP64_Vector3* initial_vector); extern inline void bgc_fp64_affine3_transform_vector(BGC_FP64_Vector3* const transformed_vector, const BGC_FP64_Affine3* const affine, const BGC_FP64_Vector3* const initial_vector);

View file

@ -7,13 +7,13 @@
// ==================== Reset ==================== // // ==================== Reset ==================== //
inline void bgc_fp32_affine3_reset(BGC_FP32_Affine3 * affine) inline void bgc_fp32_affine3_reset(BGC_FP32_Affine3* const affine)
{ {
bgc_fp32_matrix3x3_make_identity(&affine->distortion); bgc_fp32_matrix3x3_make_identity(&affine->distortion);
bgc_fp32_vector3_reset(&affine->shift); bgc_fp32_vector3_reset(&affine->shift);
} }
inline void bgc_fp64_affine3_reset(BGC_FP64_Affine3 * affine) inline void bgc_fp64_affine3_reset(BGC_FP64_Affine3* const affine)
{ {
bgc_fp64_matrix3x3_make_identity(&affine->distortion); bgc_fp64_matrix3x3_make_identity(&affine->distortion);
bgc_fp64_vector3_reset(&affine->shift); bgc_fp64_vector3_reset(&affine->shift);
@ -21,13 +21,13 @@ inline void bgc_fp64_affine3_reset(BGC_FP64_Affine3 * affine)
// ==================== Make ===================== // // ==================== Make ===================== //
inline void bgc_fp32_affine3_make(BGC_FP32_Affine3* affine, const BGC_FP32_Matrix3x3 * distortion, const BGC_FP32_Vector3 * shift) inline void bgc_fp32_affine3_make(BGC_FP32_Affine3* const affine, const BGC_FP32_Matrix3x3* const distortion, const BGC_FP32_Vector3* const shift)
{ {
bgc_fp32_matrix3x3_copy(&affine->distortion, distortion); bgc_fp32_matrix3x3_copy(&affine->distortion, distortion);
bgc_fp32_vector3_copy(&affine->shift, shift); bgc_fp32_vector3_copy(&affine->shift, shift);
} }
inline void bgc_fp64_affine3_make(BGC_FP64_Affine3* affine, const BGC_FP64_Matrix3x3 * distortion, const BGC_FP64_Vector3 * shift) inline void bgc_fp64_affine3_make(BGC_FP64_Affine3* const affine, const BGC_FP64_Matrix3x3* const distortion, const BGC_FP64_Vector3* const shift)
{ {
bgc_fp64_matrix3x3_copy(&affine->distortion, distortion); bgc_fp64_matrix3x3_copy(&affine->distortion, distortion);
bgc_fp64_vector3_copy(&affine->shift, shift); bgc_fp64_vector3_copy(&affine->shift, shift);
@ -35,13 +35,13 @@ inline void bgc_fp64_affine3_make(BGC_FP64_Affine3* affine, const BGC_FP64_Matri
// ==================== Copy ===================== // // ==================== Copy ===================== //
inline void bgc_fp32_affine3_copy(BGC_FP32_Affine3* destination, const BGC_FP32_Affine3 * source) inline void bgc_fp32_affine3_copy(BGC_FP32_Affine3* const destination, const BGC_FP32_Affine3* const source)
{ {
bgc_fp32_matrix3x3_copy(&destination->distortion, &source->distortion); bgc_fp32_matrix3x3_copy(&destination->distortion, &source->distortion);
bgc_fp32_vector3_copy(&destination->shift, &source->shift); bgc_fp32_vector3_copy(&destination->shift, &source->shift);
} }
inline void bgc_fp64_affine3_copy(BGC_FP64_Affine3* destination, const BGC_FP64_Affine3 * source) inline void bgc_fp64_affine3_copy(BGC_FP64_Affine3* const destination, const BGC_FP64_Affine3* const source)
{ {
bgc_fp64_matrix3x3_copy(&destination->distortion, &source->distortion); bgc_fp64_matrix3x3_copy(&destination->distortion, &source->distortion);
bgc_fp64_vector3_copy(&destination->shift, &source->shift); bgc_fp64_vector3_copy(&destination->shift, &source->shift);
@ -49,13 +49,13 @@ inline void bgc_fp64_affine3_copy(BGC_FP64_Affine3* destination, const BGC_FP64_
// ==================== Swap ===================== // // ==================== Swap ===================== //
inline void bgc_fp32_affine3_swap(BGC_FP32_Affine3 * first, BGC_FP32_Affine3 * second) inline void bgc_fp32_affine3_swap(BGC_FP32_Affine3* const first, BGC_FP32_Affine3* const second)
{ {
bgc_fp32_matrix3x3_swap(&first->distortion, &second->distortion); bgc_fp32_matrix3x3_swap(&first->distortion, &second->distortion);
bgc_fp32_vector3_swap(&first->shift, &second->shift); bgc_fp32_vector3_swap(&first->shift, &second->shift);
} }
inline void bgc_fp64_affine3_swap(BGC_FP64_Affine3 * first, BGC_FP64_Affine3 * second) inline void bgc_fp64_affine3_swap(BGC_FP64_Affine3* const first, BGC_FP64_Affine3* const second)
{ {
bgc_fp64_matrix3x3_swap(&first->distortion, &second->distortion); bgc_fp64_matrix3x3_swap(&first->distortion, &second->distortion);
bgc_fp64_vector3_swap(&first->shift, &second->shift); bgc_fp64_vector3_swap(&first->shift, &second->shift);
@ -63,13 +63,13 @@ inline void bgc_fp64_affine3_swap(BGC_FP64_Affine3 * first, BGC_FP64_Affine3 * s
// =================== Convert =================== // // =================== Convert =================== //
inline void bgc_fp32_affine3_convert_to_fp64(BGC_FP64_Affine3* destination, const BGC_FP32_Affine3 * source) inline void bgc_fp32_affine3_convert_to_fp64(BGC_FP64_Affine3* const destination, const BGC_FP32_Affine3* const source)
{ {
bgc_fp32_matrix3x3_convert_to_fp64(&destination->distortion, &source->distortion); bgc_fp32_matrix3x3_convert_to_fp64(&destination->distortion, &source->distortion);
bgc_fp32_vector3_convert_to_fp64(&destination->shift, &source->shift); bgc_fp32_vector3_convert_to_fp64(&destination->shift, &source->shift);
} }
inline void bgc_fp64_affine3_convert_to_fp32(BGC_FP32_Affine3* destination, const BGC_FP64_Affine3* source) inline void bgc_fp64_affine3_convert_to_fp32(BGC_FP32_Affine3* const destination, const BGC_FP64_Affine3* const source)
{ {
bgc_fp64_matrix3x3_convert_to_fp32(&destination->distortion, &source->distortion); bgc_fp64_matrix3x3_convert_to_fp32(&destination->distortion, &source->distortion);
bgc_fp64_vector3_convert_to_fp32(&destination->shift, &source->shift); bgc_fp64_vector3_convert_to_fp32(&destination->shift, &source->shift);
@ -77,7 +77,7 @@ inline void bgc_fp64_affine3_convert_to_fp32(BGC_FP32_Affine3* destination, cons
// =================== Invert ==================== // // =================== Invert ==================== //
inline int bgc_fp32_affine3_invert(BGC_FP32_Affine3 * affine) inline int bgc_fp32_affine3_invert(BGC_FP32_Affine3* const affine)
{ {
if (bgc_fp32_matrix3x3_invert(&affine->distortion) != BGC_SUCCESS) { if (bgc_fp32_matrix3x3_invert(&affine->distortion) != BGC_SUCCESS) {
return BGC_FAILURE; return BGC_FAILURE;
@ -89,7 +89,7 @@ inline int bgc_fp32_affine3_invert(BGC_FP32_Affine3 * affine)
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_affine3_invert(BGC_FP64_Affine3 * affine) inline int bgc_fp64_affine3_invert(BGC_FP64_Affine3* const affine)
{ {
if (bgc_fp64_matrix3x3_invert(&affine->distortion) != BGC_SUCCESS) { if (bgc_fp64_matrix3x3_invert(&affine->distortion) != BGC_SUCCESS) {
return BGC_FAILURE; return BGC_FAILURE;
@ -103,7 +103,7 @@ inline int bgc_fp64_affine3_invert(BGC_FP64_Affine3 * affine)
// ================= Get Inverse ================= // // ================= Get Inverse ================= //
inline int bgc_fp32_affine3_get_inverse(BGC_FP32_Affine3* destination, const BGC_FP32_Affine3 * source) inline int bgc_fp32_affine3_get_inverse(BGC_FP32_Affine3* const destination, const BGC_FP32_Affine3* const source)
{ {
if (bgc_fp32_matrix3x3_get_inverse(&destination->distortion, &source->distortion) != BGC_SUCCESS) { if (bgc_fp32_matrix3x3_get_inverse(&destination->distortion, &source->distortion) != BGC_SUCCESS) {
return BGC_FAILURE; return BGC_FAILURE;
@ -115,7 +115,7 @@ inline int bgc_fp32_affine3_get_inverse(BGC_FP32_Affine3* destination, const BGC
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_affine3_get_inverse(BGC_FP64_Affine3* destination, const BGC_FP64_Affine3 * source) inline int bgc_fp64_affine3_get_inverse(BGC_FP64_Affine3* const destination, const BGC_FP64_Affine3* const source)
{ {
if (bgc_fp64_matrix3x3_get_inverse(&destination->distortion, &source->distortion) != BGC_SUCCESS) { if (bgc_fp64_matrix3x3_get_inverse(&destination->distortion, &source->distortion) != BGC_SUCCESS) {
return BGC_FAILURE; return BGC_FAILURE;
@ -129,7 +129,7 @@ inline int bgc_fp64_affine3_get_inverse(BGC_FP64_Affine3* destination, const BGC
// =================== Combine =================== // // =================== Combine =================== //
inline void bgc_fp32_affine3_combine(BGC_FP32_Affine3* combination, const BGC_FP32_Affine3 * first, const BGC_FP32_Affine3 * second) inline void bgc_fp32_affine3_combine(BGC_FP32_Affine3* const combination, const BGC_FP32_Affine3* const first, const BGC_FP32_Affine3* const second)
{ {
BGC_FP32_Vector3 first_shift; BGC_FP32_Vector3 first_shift;
bgc_fp32_matrix3x3_multiply_by_vector3(&first_shift, &second->distortion, &first->shift); bgc_fp32_matrix3x3_multiply_by_vector3(&first_shift, &second->distortion, &first->shift);
@ -137,7 +137,7 @@ inline void bgc_fp32_affine3_combine(BGC_FP32_Affine3* combination, const BGC_FP
bgc_fp32_vector3_add(&combination->shift, &first_shift, &second->shift); bgc_fp32_vector3_add(&combination->shift, &first_shift, &second->shift);
} }
inline void bgc_fp64_affine3_combine(BGC_FP64_Affine3* combination, const BGC_FP64_Affine3 * first, const BGC_FP64_Affine3 * second) inline void bgc_fp64_affine3_combine(BGC_FP64_Affine3* const combination, const BGC_FP64_Affine3* const first, const BGC_FP64_Affine3* const second)
{ {
BGC_FP64_Vector3 first_shift; BGC_FP64_Vector3 first_shift;
bgc_fp64_matrix3x3_multiply_by_vector3(&first_shift, &second->distortion, &first->shift); bgc_fp64_matrix3x3_multiply_by_vector3(&first_shift, &second->distortion, &first->shift);
@ -147,14 +147,14 @@ inline void bgc_fp64_affine3_combine(BGC_FP64_Affine3* combination, const BGC_FP
// =============== Transform Point =============== // // =============== Transform Point =============== //
inline void bgc_fp32_affine3_transform_point(BGC_FP32_Vector3* transformed_point, const BGC_FP32_Affine3 * affine, const BGC_FP32_Vector3 * initial_point) inline void bgc_fp32_affine3_transform_point(BGC_FP32_Vector3* const transformed_point, const BGC_FP32_Affine3* const affine, const BGC_FP32_Vector3* const initial_point)
{ {
BGC_FP32_Vector3 distorted; BGC_FP32_Vector3 distorted;
bgc_fp32_matrix3x3_multiply_by_vector3(&distorted, &affine->distortion, initial_point); bgc_fp32_matrix3x3_multiply_by_vector3(&distorted, &affine->distortion, initial_point);
bgc_fp32_vector3_add(transformed_point, &affine->shift, &distorted); bgc_fp32_vector3_add(transformed_point, &affine->shift, &distorted);
} }
inline void bgc_fp64_affine3_transform_point(BGC_FP64_Vector3* transformed_point, const BGC_FP64_Affine3 * affine, const BGC_FP64_Vector3 * initial_point) inline void bgc_fp64_affine3_transform_point(BGC_FP64_Vector3* const transformed_point, const BGC_FP64_Affine3* const affine, const BGC_FP64_Vector3* const initial_point)
{ {
BGC_FP64_Vector3 distorted; BGC_FP64_Vector3 distorted;
bgc_fp64_matrix3x3_multiply_by_vector3(&distorted, &affine->distortion, initial_point); bgc_fp64_matrix3x3_multiply_by_vector3(&distorted, &affine->distortion, initial_point);
@ -163,12 +163,12 @@ inline void bgc_fp64_affine3_transform_point(BGC_FP64_Vector3* transformed_point
// ============== Transform Vector =============== // // ============== Transform Vector =============== //
inline void bgc_fp32_affine3_transform_vector(BGC_FP32_Vector3* transformed_vector, const BGC_FP32_Affine3 * affine, const BGC_FP32_Vector3 * initial_vector) inline void bgc_fp32_affine3_transform_vector(BGC_FP32_Vector3* const transformed_vector, const BGC_FP32_Affine3* const affine, const BGC_FP32_Vector3* const initial_vector)
{ {
bgc_fp32_matrix3x3_multiply_by_vector3(transformed_vector, &affine->distortion, initial_vector); bgc_fp32_matrix3x3_multiply_by_vector3(transformed_vector, &affine->distortion, initial_vector);
} }
inline void bgc_fp64_affine3_transform_vector(BGC_FP64_Vector3* transformed_vector, const BGC_FP64_Affine3 * affine, const BGC_FP64_Vector3 * initial_vector) inline void bgc_fp64_affine3_transform_vector(BGC_FP64_Vector3* const transformed_vector, const BGC_FP64_Affine3* const affine, const BGC_FP64_Vector3* const initial_vector)
{ {
bgc_fp64_matrix3x3_multiply_by_vector3(transformed_vector, &affine->distortion, initial_vector); bgc_fp64_matrix3x3_multiply_by_vector3(transformed_vector, &affine->distortion, initial_vector);
} }

View file

@ -1,64 +1,64 @@
#include "./dual-vector3.h" #include "./dual-vector3.h"
extern inline void bgc_fp32_dual_vector3_reset(BGC_FP32_DualVector3* vector); extern inline void bgc_fp32_dual_vector3_reset(BGC_FP32_DualVector3* const vector);
extern inline void bgc_fp64_dual_vector3_reset(BGC_FP64_DualVector3* vector); extern inline void bgc_fp64_dual_vector3_reset(BGC_FP64_DualVector3* const vector);
extern inline void bgc_fp32_dual_vector3_copy(BGC_FP32_DualVector3* destination, const BGC_FP32_DualVector3* source); extern inline void bgc_fp32_dual_vector3_copy(BGC_FP32_DualVector3* const destination, const BGC_FP32_DualVector3* const source);
extern inline void bgc_fp64_dual_vector3_copy(BGC_FP64_DualVector3* destination, const BGC_FP64_DualVector3* source); extern inline void bgc_fp64_dual_vector3_copy(BGC_FP64_DualVector3* const destination, const BGC_FP64_DualVector3* const source);
extern inline void bgc_fp32_dual_vector3_swap(BGC_FP32_DualVector3* first, BGC_FP32_DualVector3* second); extern inline void bgc_fp32_dual_vector3_swap(BGC_FP32_DualVector3* const first, BGC_FP32_DualVector3* const second);
extern inline void bgc_fp64_dual_vector3_swap(BGC_FP64_DualVector3* first, BGC_FP64_DualVector3* second); extern inline void bgc_fp64_dual_vector3_swap(BGC_FP64_DualVector3* const first, BGC_FP64_DualVector3* const second);
extern inline void bgc_fp32_dual_vector3_convert_to_fp64(BGC_FP64_DualVector3* destination, const BGC_FP32_DualVector3* source); extern inline void bgc_fp32_dual_vector3_convert_to_fp64(BGC_FP64_DualVector3* const destination, const BGC_FP32_DualVector3* const source);
extern inline void bgc_fp64_dual_vector3_convert_to_fp32(BGC_FP32_DualVector3* destination, const BGC_FP64_DualVector3* source); extern inline void bgc_fp64_dual_vector3_convert_to_fp32(BGC_FP32_DualVector3* const destination, const BGC_FP64_DualVector3* const source);
extern inline void bgc_fp32_dual_vector3_revert(BGC_FP32_DualVector3* vector); extern inline void bgc_fp32_dual_vector3_revert(BGC_FP32_DualVector3* const vector);
extern inline void bgc_fp64_dual_vector3_revert(BGC_FP64_DualVector3* vector); extern inline void bgc_fp64_dual_vector3_revert(BGC_FP64_DualVector3* const vector);
extern inline void bgc_fp32_dual_vector3_get_reverse(BGC_FP32_DualVector3* reverse, const BGC_FP32_DualVector3* vector); extern inline void bgc_fp32_dual_vector3_get_reverse(BGC_FP32_DualVector3* const reverse, const BGC_FP32_DualVector3* const vector);
extern inline void bgc_fp64_dual_vector3_get_reverse(BGC_FP64_DualVector3* reverse, const BGC_FP64_DualVector3* vector); extern inline void bgc_fp64_dual_vector3_get_reverse(BGC_FP64_DualVector3* const reverse, const BGC_FP64_DualVector3* const vector);
extern inline void bgc_fp32_dual_vector3_add(BGC_FP32_DualVector3* sum, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second); extern inline void bgc_fp32_dual_vector3_add(BGC_FP32_DualVector3* const sum, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second);
extern inline void bgc_fp64_dual_vector3_add(BGC_FP64_DualVector3* sum, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second); extern inline void bgc_fp64_dual_vector3_add(BGC_FP64_DualVector3* const sum, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second);
extern inline void bgc_fp32_dual_vector3_add_scaled(BGC_FP32_DualVector3* sum, const BGC_FP32_DualVector3* base_vector, const BGC_FP32_DualVector3* scalable_vector, const float scale); extern inline void bgc_fp32_dual_vector3_add_scaled(BGC_FP32_DualVector3* const sum, const BGC_FP32_DualVector3* const base_vector, const BGC_FP32_DualVector3* const scalable_vector, const float scale);
extern inline void bgc_fp64_dual_vector3_add_scaled(BGC_FP64_DualVector3* sum, const BGC_FP64_DualVector3* base_vector, const BGC_FP64_DualVector3* scalable_vector, const double scale); extern inline void bgc_fp64_dual_vector3_add_scaled(BGC_FP64_DualVector3* const sum, const BGC_FP64_DualVector3* const base_vector, const BGC_FP64_DualVector3* const scalable_vector, const double scale);
extern inline void bgc_fp32_dual_vector3_subtract(BGC_FP32_DualVector3* difference, const BGC_FP32_DualVector3* minuend, const BGC_FP32_DualVector3* subtrahend); extern inline void bgc_fp32_dual_vector3_subtract(BGC_FP32_DualVector3* const difference, const BGC_FP32_DualVector3* const minuend, const BGC_FP32_DualVector3* const subtrahend);
extern inline void bgc_fp64_dual_vector3_subtract(BGC_FP64_DualVector3* difference, const BGC_FP64_DualVector3* minuend, const BGC_FP64_DualVector3* subtrahend); extern inline void bgc_fp64_dual_vector3_subtract(BGC_FP64_DualVector3* const difference, const BGC_FP64_DualVector3* const minuend, const BGC_FP64_DualVector3* const subtrahend);
extern inline void bgc_fp32_dual_vector3_subtract_scaled(BGC_FP32_DualVector3* difference, const BGC_FP32_DualVector3* base_vector, const BGC_FP32_DualVector3* scalable_vector, const float scale); extern inline void bgc_fp32_dual_vector3_subtract_scaled(BGC_FP32_DualVector3* const difference, const BGC_FP32_DualVector3* const base_vector, const BGC_FP32_DualVector3* const scalable_vector, const float scale);
extern inline void bgc_fp64_dual_vector3_subtract_scaled(BGC_FP64_DualVector3* difference, const BGC_FP64_DualVector3* base_vector, const BGC_FP64_DualVector3* scalable_vector, const double scale); extern inline void bgc_fp64_dual_vector3_subtract_scaled(BGC_FP64_DualVector3* const difference, const BGC_FP64_DualVector3* const base_vector, const BGC_FP64_DualVector3* const scalable_vector, const double scale);
extern inline void bgc_fp32_dual_vector3_multiply_by_real(BGC_FP32_DualVector3* product, const BGC_FP32_DualVector3* multiplicand, const float multiplier); extern inline void bgc_fp32_dual_vector3_multiply_by_real(BGC_FP32_DualVector3* const product, const BGC_FP32_DualVector3* const multiplicand, const float multiplier);
extern inline void bgc_fp64_dual_vector3_multiply_by_real(BGC_FP64_DualVector3* product, const BGC_FP64_DualVector3* multiplicand, const double multiplier); extern inline void bgc_fp64_dual_vector3_multiply_by_real(BGC_FP64_DualVector3* const product, const BGC_FP64_DualVector3* const multiplicand, const double multiplier);
extern inline void bgc_fp32_dual_vector3_multiply_by_dual(BGC_FP32_DualVector3* product, const BGC_FP32_DualVector3* multiplicand, const BGC_FP32_DualNumber* multiplier); extern inline void bgc_fp32_dual_vector3_multiply_by_dual(BGC_FP32_DualVector3* const product, const BGC_FP32_DualVector3* const multiplicand, const BGC_FP32_DualNumber* const multiplier);
extern inline void bgc_fp64_dual_vector3_multiply_by_dual(BGC_FP64_DualVector3* product, const BGC_FP64_DualVector3* multiplicand, const BGC_FP64_DualNumber* multiplier); extern inline void bgc_fp64_dual_vector3_multiply_by_dual(BGC_FP64_DualVector3* const product, const BGC_FP64_DualVector3* const multiplicand, const BGC_FP64_DualNumber* const multiplier);
extern inline void bgc_fp32_dual_vector3_multiply_by_conjugate(BGC_FP32_DualVector3* product, const BGC_FP32_DualVector3* multiplicand, const BGC_FP32_DualNumber* multiplier_to_conjugate); extern inline void bgc_fp32_dual_vector3_multiply_by_conjugate(BGC_FP32_DualVector3* const product, const BGC_FP32_DualVector3* const multiplicand, const BGC_FP32_DualNumber* const multiplier_to_conjugate);
extern inline void bgc_fp64_dual_vector3_multiply_by_conjugate(BGC_FP64_DualVector3* product, const BGC_FP64_DualVector3* multiplicand, const BGC_FP64_DualNumber* multiplier_to_conjugate); extern inline void bgc_fp64_dual_vector3_multiply_by_conjugate(BGC_FP64_DualVector3* const product, const BGC_FP64_DualVector3* const multiplicand, const BGC_FP64_DualNumber* const multiplier_to_conjugate);
extern inline int bgc_fp32_dual_vector3_divide_by_real(BGC_FP32_DualVector3* quotient, const BGC_FP32_DualVector3* dividend, const float divisor); extern inline int bgc_fp32_dual_vector3_divide_by_real(BGC_FP32_DualVector3* const quotient, const BGC_FP32_DualVector3* const dividend, const float divisor);
extern inline int bgc_fp64_dual_vector3_divide_by_real(BGC_FP64_DualVector3* quotient, const BGC_FP64_DualVector3* dividend, const double divisor); extern inline int bgc_fp64_dual_vector3_divide_by_real(BGC_FP64_DualVector3* const quotient, const BGC_FP64_DualVector3* const dividend, const double divisor);
extern inline int bgc_fp32_dual_vector3_divide_by_dual(BGC_FP32_DualVector3* quotient, const BGC_FP32_DualVector3* dividend, const BGC_FP32_DualNumber* divisor); extern inline int bgc_fp32_dual_vector3_divide_by_dual(BGC_FP32_DualVector3* const quotient, const BGC_FP32_DualVector3* const dividend, const BGC_FP32_DualNumber* const divisor);
extern inline int bgc_fp64_dual_vector3_divide_by_dual(BGC_FP64_DualVector3* quotient, const BGC_FP64_DualVector3* dividend, const BGC_FP64_DualNumber* divisor); extern inline int bgc_fp64_dual_vector3_divide_by_dual(BGC_FP64_DualVector3* const quotient, const BGC_FP64_DualVector3* const dividend, const BGC_FP64_DualNumber* const divisor);
extern inline int bgc_fp32_dual_vector3_divide_by_conjugate(BGC_FP32_DualVector3* quotient, const BGC_FP32_DualVector3* dividend, const BGC_FP32_DualNumber* divisor_to_conjugate); extern inline int bgc_fp32_dual_vector3_divide_by_conjugate(BGC_FP32_DualVector3* const quotient, const BGC_FP32_DualVector3* const dividend, const BGC_FP32_DualNumber* const divisor_to_conjugate);
extern inline int bgc_fp64_dual_vector3_divide_by_conjugate(BGC_FP64_DualVector3* quotient, const BGC_FP64_DualVector3* dividend, const BGC_FP64_DualNumber* divisor_to_conjugate); extern inline int bgc_fp64_dual_vector3_divide_by_conjugate(BGC_FP64_DualVector3* const quotient, const BGC_FP64_DualVector3* const dividend, const BGC_FP64_DualNumber* const divisor_to_conjugate);
extern inline void bgc_fp32_dual_vector3_get_mean2(BGC_FP32_DualVector3* mean, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second); extern inline void bgc_fp32_dual_vector3_get_mean2(BGC_FP32_DualVector3* const mean, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second);
extern inline void bgc_fp64_dual_vector3_get_mean2(BGC_FP64_DualVector3* mean, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second); extern inline void bgc_fp64_dual_vector3_get_mean2(BGC_FP64_DualVector3* const mean, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second);
extern inline void bgc_fp32_dual_vector3_get_mean3(BGC_FP32_DualVector3* mean, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second, const BGC_FP32_DualVector3* third); extern inline void bgc_fp32_dual_vector3_get_mean3(BGC_FP32_DualVector3* const mean, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second, const BGC_FP32_DualVector3* const third);
extern inline void bgc_fp64_dual_vector3_get_mean3(BGC_FP64_DualVector3* mean, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second, const BGC_FP64_DualVector3* third); extern inline void bgc_fp64_dual_vector3_get_mean3(BGC_FP64_DualVector3* const mean, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second, const BGC_FP64_DualVector3* const third);
extern inline void bgc_fp32_dual_vector3_interpolate(BGC_FP32_DualVector3* interpolation, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second, const float phase); extern inline void bgc_fp32_dual_vector3_interpolate(BGC_FP32_DualVector3* const interpolation, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second, const float phase);
extern inline void bgc_fp64_dual_vector3_interpolate(BGC_FP64_DualVector3* interpolation, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second, const double phase); extern inline void bgc_fp64_dual_vector3_interpolate(BGC_FP64_DualVector3* const interpolation, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second, const double phase);
extern inline void bgc_fp32_dual_vector3_get_dot_product(BGC_FP32_DualNumber* product, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second); extern inline void bgc_fp32_dual_vector3_get_dot_product(BGC_FP32_DualNumber* const product, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second);
extern inline void bgc_fp64_dual_vector3_get_dot_product(BGC_FP64_DualNumber* product, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second); extern inline void bgc_fp64_dual_vector3_get_dot_product(BGC_FP64_DualNumber* const product, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second);
extern inline void bgc_fp32_dual_vector3_get_cross_product(BGC_FP32_DualVector3* product, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second); extern inline void bgc_fp32_dual_vector3_get_cross_product(BGC_FP32_DualVector3* const product, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second);
extern inline void bgc_fp64_dual_vector3_get_cross_product(BGC_FP64_DualVector3* product, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second); extern inline void bgc_fp64_dual_vector3_get_cross_product(BGC_FP64_DualVector3* const product, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second);

View file

@ -6,13 +6,13 @@
// =================== Reset ==================== // // =================== Reset ==================== //
inline void bgc_fp32_dual_vector3_reset(BGC_FP32_DualVector3* vector) inline void bgc_fp32_dual_vector3_reset(BGC_FP32_DualVector3* const vector)
{ {
bgc_fp32_vector3_reset(&vector->real_part); bgc_fp32_vector3_reset(&vector->real_part);
bgc_fp32_vector3_reset(&vector->dual_part); bgc_fp32_vector3_reset(&vector->dual_part);
} }
inline void bgc_fp64_dual_vector3_reset(BGC_FP64_DualVector3* vector) inline void bgc_fp64_dual_vector3_reset(BGC_FP64_DualVector3* const vector)
{ {
bgc_fp64_vector3_reset(&vector->real_part); bgc_fp64_vector3_reset(&vector->real_part);
bgc_fp64_vector3_reset(&vector->dual_part); bgc_fp64_vector3_reset(&vector->dual_part);
@ -20,13 +20,13 @@ inline void bgc_fp64_dual_vector3_reset(BGC_FP64_DualVector3* vector)
// ==================== Copy ==================== // // ==================== Copy ==================== //
inline void bgc_fp32_dual_vector3_copy(BGC_FP32_DualVector3* destination, const BGC_FP32_DualVector3* source) inline void bgc_fp32_dual_vector3_copy(BGC_FP32_DualVector3* const destination, const BGC_FP32_DualVector3* const source)
{ {
bgc_fp32_vector3_copy(&destination->real_part, &source->real_part); bgc_fp32_vector3_copy(&destination->real_part, &source->real_part);
bgc_fp32_vector3_copy(&destination->dual_part, &source->dual_part); bgc_fp32_vector3_copy(&destination->dual_part, &source->dual_part);
} }
inline void bgc_fp64_dual_vector3_copy(BGC_FP64_DualVector3* destination, const BGC_FP64_DualVector3* source) inline void bgc_fp64_dual_vector3_copy(BGC_FP64_DualVector3* const destination, const BGC_FP64_DualVector3* const source)
{ {
bgc_fp64_vector3_copy(&destination->real_part, &source->real_part); bgc_fp64_vector3_copy(&destination->real_part, &source->real_part);
bgc_fp64_vector3_copy(&destination->dual_part, &source->dual_part); bgc_fp64_vector3_copy(&destination->dual_part, &source->dual_part);
@ -34,13 +34,13 @@ inline void bgc_fp64_dual_vector3_copy(BGC_FP64_DualVector3* destination, const
// ==================== Swap ==================== // // ==================== Swap ==================== //
inline void bgc_fp32_dual_vector3_swap(BGC_FP32_DualVector3* first, BGC_FP32_DualVector3* second) inline void bgc_fp32_dual_vector3_swap(BGC_FP32_DualVector3* const first, BGC_FP32_DualVector3* const second)
{ {
bgc_fp32_vector3_swap(&first->real_part, &second->real_part); bgc_fp32_vector3_swap(&first->real_part, &second->real_part);
bgc_fp32_vector3_swap(&first->dual_part, &second->dual_part); bgc_fp32_vector3_swap(&first->dual_part, &second->dual_part);
} }
inline void bgc_fp64_dual_vector3_swap(BGC_FP64_DualVector3* first, BGC_FP64_DualVector3* second) inline void bgc_fp64_dual_vector3_swap(BGC_FP64_DualVector3* const first, BGC_FP64_DualVector3* const second)
{ {
bgc_fp64_vector3_swap(&first->real_part, &second->real_part); bgc_fp64_vector3_swap(&first->real_part, &second->real_part);
bgc_fp64_vector3_swap(&first->dual_part, &second->dual_part); bgc_fp64_vector3_swap(&first->dual_part, &second->dual_part);
@ -48,13 +48,13 @@ inline void bgc_fp64_dual_vector3_swap(BGC_FP64_DualVector3* first, BGC_FP64_Dua
// ================== Convert =================== // // ================== Convert =================== //
inline void bgc_fp32_dual_vector3_convert_to_fp64(BGC_FP64_DualVector3* destination, const BGC_FP32_DualVector3* source) inline void bgc_fp32_dual_vector3_convert_to_fp64(BGC_FP64_DualVector3* const destination, const BGC_FP32_DualVector3* const source)
{ {
bgc_fp32_vector3_convert_to_fp64(&destination->real_part, &source->real_part); bgc_fp32_vector3_convert_to_fp64(&destination->real_part, &source->real_part);
bgc_fp32_vector3_convert_to_fp64(&destination->dual_part, &source->dual_part); bgc_fp32_vector3_convert_to_fp64(&destination->dual_part, &source->dual_part);
} }
inline void bgc_fp64_dual_vector3_convert_to_fp32(BGC_FP32_DualVector3* destination, const BGC_FP64_DualVector3* source) inline void bgc_fp64_dual_vector3_convert_to_fp32(BGC_FP32_DualVector3* const destination, const BGC_FP64_DualVector3* const source)
{ {
bgc_fp64_vector3_convert_to_fp32(&destination->real_part, &source->real_part); bgc_fp64_vector3_convert_to_fp32(&destination->real_part, &source->real_part);
bgc_fp64_vector3_convert_to_fp32(&destination->dual_part, &source->dual_part); bgc_fp64_vector3_convert_to_fp32(&destination->dual_part, &source->dual_part);
@ -62,13 +62,13 @@ inline void bgc_fp64_dual_vector3_convert_to_fp32(BGC_FP32_DualVector3* destinat
// =================== Revert =================== // // =================== Revert =================== //
inline void bgc_fp32_dual_vector3_revert(BGC_FP32_DualVector3* vector) inline void bgc_fp32_dual_vector3_revert(BGC_FP32_DualVector3* const vector)
{ {
bgc_fp32_vector3_revert(&vector->real_part); bgc_fp32_vector3_revert(&vector->real_part);
bgc_fp32_vector3_revert(&vector->dual_part); bgc_fp32_vector3_revert(&vector->dual_part);
} }
inline void bgc_fp64_dual_vector3_revert(BGC_FP64_DualVector3* vector) inline void bgc_fp64_dual_vector3_revert(BGC_FP64_DualVector3* const vector)
{ {
bgc_fp64_vector3_revert(&vector->real_part); bgc_fp64_vector3_revert(&vector->real_part);
bgc_fp64_vector3_revert(&vector->dual_part); bgc_fp64_vector3_revert(&vector->dual_part);
@ -76,13 +76,13 @@ inline void bgc_fp64_dual_vector3_revert(BGC_FP64_DualVector3* vector)
// ================ Get Reverse ================= // // ================ Get Reverse ================= //
inline void bgc_fp32_dual_vector3_get_reverse(BGC_FP32_DualVector3* reverse, const BGC_FP32_DualVector3* vector) inline void bgc_fp32_dual_vector3_get_reverse(BGC_FP32_DualVector3* const reverse, const BGC_FP32_DualVector3* const vector)
{ {
bgc_fp32_vector3_get_reverse(&reverse->real_part, &vector->real_part); bgc_fp32_vector3_get_reverse(&reverse->real_part, &vector->real_part);
bgc_fp32_vector3_get_reverse(&reverse->dual_part, &vector->dual_part); bgc_fp32_vector3_get_reverse(&reverse->dual_part, &vector->dual_part);
} }
inline void bgc_fp64_dual_vector3_get_reverse(BGC_FP64_DualVector3* reverse, const BGC_FP64_DualVector3* vector) inline void bgc_fp64_dual_vector3_get_reverse(BGC_FP64_DualVector3* const reverse, const BGC_FP64_DualVector3* const vector)
{ {
bgc_fp64_vector3_get_reverse(&reverse->real_part, &vector->real_part); bgc_fp64_vector3_get_reverse(&reverse->real_part, &vector->real_part);
bgc_fp64_vector3_get_reverse(&reverse->dual_part, &vector->dual_part); bgc_fp64_vector3_get_reverse(&reverse->dual_part, &vector->dual_part);
@ -90,13 +90,13 @@ inline void bgc_fp64_dual_vector3_get_reverse(BGC_FP64_DualVector3* reverse, con
// ==================== Add ===================== // // ==================== Add ===================== //
inline void bgc_fp32_dual_vector3_add(BGC_FP32_DualVector3* sum, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second) inline void bgc_fp32_dual_vector3_add(BGC_FP32_DualVector3* const sum, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second)
{ {
bgc_fp32_vector3_add(&sum->real_part, &first->real_part, &second->real_part); bgc_fp32_vector3_add(&sum->real_part, &first->real_part, &second->real_part);
bgc_fp32_vector3_add(&sum->dual_part, &first->dual_part, &second->dual_part); bgc_fp32_vector3_add(&sum->dual_part, &first->dual_part, &second->dual_part);
} }
inline void bgc_fp64_dual_vector3_add(BGC_FP64_DualVector3* sum, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second) inline void bgc_fp64_dual_vector3_add(BGC_FP64_DualVector3* const sum, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second)
{ {
bgc_fp64_vector3_add(&sum->real_part, &first->real_part, &second->real_part); bgc_fp64_vector3_add(&sum->real_part, &first->real_part, &second->real_part);
bgc_fp64_vector3_add(&sum->dual_part, &first->dual_part, &second->dual_part); bgc_fp64_vector3_add(&sum->dual_part, &first->dual_part, &second->dual_part);
@ -104,13 +104,13 @@ inline void bgc_fp64_dual_vector3_add(BGC_FP64_DualVector3* sum, const BGC_FP64_
// ================= Add Scaled ================= // // ================= Add Scaled ================= //
inline void bgc_fp32_dual_vector3_add_scaled(BGC_FP32_DualVector3* sum, const BGC_FP32_DualVector3* base_vector, const BGC_FP32_DualVector3* scalable_vector, const float scale) inline void bgc_fp32_dual_vector3_add_scaled(BGC_FP32_DualVector3* const sum, const BGC_FP32_DualVector3* const base_vector, const BGC_FP32_DualVector3* const scalable_vector, const float scale)
{ {
bgc_fp32_vector3_add_scaled(&sum->real_part, &base_vector->real_part, &scalable_vector->real_part, scale); bgc_fp32_vector3_add_scaled(&sum->real_part, &base_vector->real_part, &scalable_vector->real_part, scale);
bgc_fp32_vector3_add_scaled(&sum->dual_part, &base_vector->dual_part, &scalable_vector->dual_part, scale); bgc_fp32_vector3_add_scaled(&sum->dual_part, &base_vector->dual_part, &scalable_vector->dual_part, scale);
} }
inline void bgc_fp64_dual_vector3_add_scaled(BGC_FP64_DualVector3* sum, const BGC_FP64_DualVector3* base_vector, const BGC_FP64_DualVector3* scalable_vector, const double scale) inline void bgc_fp64_dual_vector3_add_scaled(BGC_FP64_DualVector3* const sum, const BGC_FP64_DualVector3* const base_vector, const BGC_FP64_DualVector3* const scalable_vector, const double scale)
{ {
bgc_fp64_vector3_add_scaled(&sum->real_part, &base_vector->real_part, &scalable_vector->real_part, scale); bgc_fp64_vector3_add_scaled(&sum->real_part, &base_vector->real_part, &scalable_vector->real_part, scale);
bgc_fp64_vector3_add_scaled(&sum->dual_part, &base_vector->dual_part, &scalable_vector->dual_part, scale); bgc_fp64_vector3_add_scaled(&sum->dual_part, &base_vector->dual_part, &scalable_vector->dual_part, scale);
@ -118,13 +118,13 @@ inline void bgc_fp64_dual_vector3_add_scaled(BGC_FP64_DualVector3* sum, const BG
// ================== Subtract ================== // // ================== Subtract ================== //
inline void bgc_fp32_dual_vector3_subtract(BGC_FP32_DualVector3* difference, const BGC_FP32_DualVector3* minuend, const BGC_FP32_DualVector3* subtrahend) inline void bgc_fp32_dual_vector3_subtract(BGC_FP32_DualVector3* const difference, const BGC_FP32_DualVector3* const minuend, const BGC_FP32_DualVector3* const subtrahend)
{ {
bgc_fp32_vector3_subtract(&difference->real_part, &minuend->real_part, &subtrahend->real_part); bgc_fp32_vector3_subtract(&difference->real_part, &minuend->real_part, &subtrahend->real_part);
bgc_fp32_vector3_subtract(&difference->dual_part, &minuend->dual_part, &subtrahend->dual_part); bgc_fp32_vector3_subtract(&difference->dual_part, &minuend->dual_part, &subtrahend->dual_part);
} }
inline void bgc_fp64_dual_vector3_subtract(BGC_FP64_DualVector3* difference, const BGC_FP64_DualVector3* minuend, const BGC_FP64_DualVector3* subtrahend) inline void bgc_fp64_dual_vector3_subtract(BGC_FP64_DualVector3* const difference, const BGC_FP64_DualVector3* const minuend, const BGC_FP64_DualVector3* const subtrahend)
{ {
bgc_fp64_vector3_subtract(&difference->real_part, &minuend->real_part, &subtrahend->real_part); bgc_fp64_vector3_subtract(&difference->real_part, &minuend->real_part, &subtrahend->real_part);
bgc_fp64_vector3_subtract(&difference->dual_part, &minuend->dual_part, &subtrahend->dual_part); bgc_fp64_vector3_subtract(&difference->dual_part, &minuend->dual_part, &subtrahend->dual_part);
@ -132,13 +132,13 @@ inline void bgc_fp64_dual_vector3_subtract(BGC_FP64_DualVector3* difference, con
// ============== Subtract Scaled =============== // // ============== Subtract Scaled =============== //
inline void bgc_fp32_dual_vector3_subtract_scaled(BGC_FP32_DualVector3* difference, const BGC_FP32_DualVector3* base_vector, const BGC_FP32_DualVector3* scalable_vector, const float scale) inline void bgc_fp32_dual_vector3_subtract_scaled(BGC_FP32_DualVector3* const difference, const BGC_FP32_DualVector3* const base_vector, const BGC_FP32_DualVector3* const scalable_vector, const float scale)
{ {
bgc_fp32_vector3_subtract_scaled(&difference->real_part, &base_vector->real_part, &scalable_vector->real_part, scale); bgc_fp32_vector3_subtract_scaled(&difference->real_part, &base_vector->real_part, &scalable_vector->real_part, scale);
bgc_fp32_vector3_subtract_scaled(&difference->dual_part, &base_vector->dual_part, &scalable_vector->dual_part, scale); bgc_fp32_vector3_subtract_scaled(&difference->dual_part, &base_vector->dual_part, &scalable_vector->dual_part, scale);
} }
inline void bgc_fp64_dual_vector3_subtract_scaled(BGC_FP64_DualVector3* difference, const BGC_FP64_DualVector3* base_vector, const BGC_FP64_DualVector3* scalable_vector, const double scale) inline void bgc_fp64_dual_vector3_subtract_scaled(BGC_FP64_DualVector3* const difference, const BGC_FP64_DualVector3* const base_vector, const BGC_FP64_DualVector3* const scalable_vector, const double scale)
{ {
bgc_fp64_vector3_subtract_scaled(&difference->real_part, &base_vector->real_part, &scalable_vector->real_part, scale); bgc_fp64_vector3_subtract_scaled(&difference->real_part, &base_vector->real_part, &scalable_vector->real_part, scale);
bgc_fp64_vector3_subtract_scaled(&difference->dual_part, &base_vector->dual_part, &scalable_vector->dual_part, scale); bgc_fp64_vector3_subtract_scaled(&difference->dual_part, &base_vector->dual_part, &scalable_vector->dual_part, scale);
@ -146,13 +146,13 @@ inline void bgc_fp64_dual_vector3_subtract_scaled(BGC_FP64_DualVector3* differen
// ================== Multiply ================== // // ================== Multiply ================== //
inline void bgc_fp32_dual_vector3_multiply_by_real(BGC_FP32_DualVector3* product, const BGC_FP32_DualVector3* multiplicand, const float multiplier) inline void bgc_fp32_dual_vector3_multiply_by_real(BGC_FP32_DualVector3* const product, const BGC_FP32_DualVector3* const multiplicand, const float multiplier)
{ {
bgc_fp32_vector3_multiply_by_real(&product->real_part, &multiplicand->real_part, multiplier); bgc_fp32_vector3_multiply_by_real(&product->real_part, &multiplicand->real_part, multiplier);
bgc_fp32_vector3_multiply_by_real(&product->dual_part, &multiplicand->dual_part, multiplier); bgc_fp32_vector3_multiply_by_real(&product->dual_part, &multiplicand->dual_part, multiplier);
} }
inline void bgc_fp64_dual_vector3_multiply_by_real(BGC_FP64_DualVector3* product, const BGC_FP64_DualVector3* multiplicand, const double multiplier) inline void bgc_fp64_dual_vector3_multiply_by_real(BGC_FP64_DualVector3* const product, const BGC_FP64_DualVector3* const multiplicand, const double multiplier)
{ {
bgc_fp64_vector3_multiply_by_real(&product->real_part, &multiplicand->real_part, multiplier); bgc_fp64_vector3_multiply_by_real(&product->real_part, &multiplicand->real_part, multiplier);
bgc_fp64_vector3_multiply_by_real(&product->dual_part, &multiplicand->dual_part, multiplier); bgc_fp64_vector3_multiply_by_real(&product->dual_part, &multiplicand->dual_part, multiplier);
@ -160,7 +160,7 @@ inline void bgc_fp64_dual_vector3_multiply_by_real(BGC_FP64_DualVector3* product
// ========== Multiply by Dual Number =========== // // ========== Multiply by Dual Number =========== //
inline void bgc_fp32_dual_vector3_multiply_by_dual(BGC_FP32_DualVector3* product, const BGC_FP32_DualVector3* multiplicand, const BGC_FP32_DualNumber* multiplier) inline void bgc_fp32_dual_vector3_multiply_by_dual(BGC_FP32_DualVector3* const product, const BGC_FP32_DualVector3* const multiplicand, const BGC_FP32_DualNumber* multiplier)
{ {
BGC_FP32_Vector3 dual_part; BGC_FP32_Vector3 dual_part;
@ -171,7 +171,7 @@ inline void bgc_fp32_dual_vector3_multiply_by_dual(BGC_FP32_DualVector3* product
bgc_fp32_vector3_copy(&product->dual_part, &dual_part); bgc_fp32_vector3_copy(&product->dual_part, &dual_part);
} }
inline void bgc_fp64_dual_vector3_multiply_by_dual(BGC_FP64_DualVector3* product, const BGC_FP64_DualVector3* multiplicand, const BGC_FP64_DualNumber* multiplier) inline void bgc_fp64_dual_vector3_multiply_by_dual(BGC_FP64_DualVector3* const product, const BGC_FP64_DualVector3* const multiplicand, const BGC_FP64_DualNumber* multiplier)
{ {
BGC_FP64_Vector3 dual_part; BGC_FP64_Vector3 dual_part;
@ -184,7 +184,7 @@ inline void bgc_fp64_dual_vector3_multiply_by_dual(BGC_FP64_DualVector3* product
// ===== Multiply by Conjugate Dual Number ====== // // ===== Multiply by Conjugate Dual Number ====== //
inline void bgc_fp32_dual_vector3_multiply_by_conjugate(BGC_FP32_DualVector3* product, const BGC_FP32_DualVector3* multiplicand, const BGC_FP32_DualNumber* multiplier_to_conjugate) inline void bgc_fp32_dual_vector3_multiply_by_conjugate(BGC_FP32_DualVector3* const product, const BGC_FP32_DualVector3* const multiplicand, const BGC_FP32_DualNumber* const multiplier_to_conjugate)
{ {
BGC_FP32_Vector3 dual_part; BGC_FP32_Vector3 dual_part;
@ -195,7 +195,7 @@ inline void bgc_fp32_dual_vector3_multiply_by_conjugate(BGC_FP32_DualVector3* pr
bgc_fp32_vector3_copy(&product->dual_part, &dual_part); bgc_fp32_vector3_copy(&product->dual_part, &dual_part);
} }
inline void bgc_fp64_dual_vector3_multiply_by_conjugate(BGC_FP64_DualVector3* product, const BGC_FP64_DualVector3* multiplicand, const BGC_FP64_DualNumber* multiplier_to_conjugate) inline void bgc_fp64_dual_vector3_multiply_by_conjugate(BGC_FP64_DualVector3* const product, const BGC_FP64_DualVector3* const multiplicand, const BGC_FP64_DualNumber* const multiplier_to_conjugate)
{ {
BGC_FP64_Vector3 dual_part; BGC_FP64_Vector3 dual_part;
@ -208,7 +208,7 @@ inline void bgc_fp64_dual_vector3_multiply_by_conjugate(BGC_FP64_DualVector3* pr
// =================== Divide =================== // // =================== Divide =================== //
inline int bgc_fp32_dual_vector3_divide_by_real(BGC_FP32_DualVector3* quotient, const BGC_FP32_DualVector3* dividend, const float divisor) inline int bgc_fp32_dual_vector3_divide_by_real(BGC_FP32_DualVector3* const quotient, const BGC_FP32_DualVector3* const dividend, const float divisor)
{ {
if (bgc_fp32_is_zero(divisor)) { if (bgc_fp32_is_zero(divisor)) {
return BGC_FAILURE; return BGC_FAILURE;
@ -222,7 +222,7 @@ inline int bgc_fp32_dual_vector3_divide_by_real(BGC_FP32_DualVector3* quotient,
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_dual_vector3_divide_by_real(BGC_FP64_DualVector3* quotient, const BGC_FP64_DualVector3* dividend, const double divisor) inline int bgc_fp64_dual_vector3_divide_by_real(BGC_FP64_DualVector3* const quotient, const BGC_FP64_DualVector3* const dividend, const double divisor)
{ {
if (bgc_fp64_is_zero(divisor)) { if (bgc_fp64_is_zero(divisor)) {
return BGC_FAILURE; return BGC_FAILURE;
@ -238,7 +238,7 @@ inline int bgc_fp64_dual_vector3_divide_by_real(BGC_FP64_DualVector3* quotient,
// =========== Divide by Dual Number ============ // // =========== Divide by Dual Number ============ //
inline int bgc_fp32_dual_vector3_divide_by_dual(BGC_FP32_DualVector3* quotient, const BGC_FP32_DualVector3* dividend, const BGC_FP32_DualNumber* divisor) inline int bgc_fp32_dual_vector3_divide_by_dual(BGC_FP32_DualVector3* const quotient, const BGC_FP32_DualVector3* const dividend, const BGC_FP32_DualNumber* const divisor)
{ {
const float square_modulus = divisor->real_part * divisor->real_part; const float square_modulus = divisor->real_part * divisor->real_part;
@ -252,7 +252,7 @@ inline int bgc_fp32_dual_vector3_divide_by_dual(BGC_FP32_DualVector3* quotient,
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_dual_vector3_divide_by_dual(BGC_FP64_DualVector3* quotient, const BGC_FP64_DualVector3* dividend, const BGC_FP64_DualNumber* divisor) inline int bgc_fp64_dual_vector3_divide_by_dual(BGC_FP64_DualVector3* const quotient, const BGC_FP64_DualVector3* const dividend, const BGC_FP64_DualNumber* const divisor)
{ {
const double square_modulus = divisor->real_part * divisor->real_part; const double square_modulus = divisor->real_part * divisor->real_part;
@ -268,7 +268,7 @@ inline int bgc_fp64_dual_vector3_divide_by_dual(BGC_FP64_DualVector3* quotient,
// ====== Divide by Conjugate Dual Number ======= // // ====== Divide by Conjugate Dual Number ======= //
inline int bgc_fp32_dual_vector3_divide_by_conjugate(BGC_FP32_DualVector3* quotient, const BGC_FP32_DualVector3* dividend, const BGC_FP32_DualNumber* divisor_to_conjugate) inline int bgc_fp32_dual_vector3_divide_by_conjugate(BGC_FP32_DualVector3* const quotient, const BGC_FP32_DualVector3* const dividend, const BGC_FP32_DualNumber* const divisor_to_conjugate)
{ {
const float square_modulus = divisor_to_conjugate->real_part * divisor_to_conjugate->real_part; const float square_modulus = divisor_to_conjugate->real_part * divisor_to_conjugate->real_part;
@ -282,7 +282,7 @@ inline int bgc_fp32_dual_vector3_divide_by_conjugate(BGC_FP32_DualVector3* quoti
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_dual_vector3_divide_by_conjugate(BGC_FP64_DualVector3* quotient, const BGC_FP64_DualVector3* dividend, const BGC_FP64_DualNumber* divisor_to_conjugate) inline int bgc_fp64_dual_vector3_divide_by_conjugate(BGC_FP64_DualVector3* const quotient, const BGC_FP64_DualVector3* const dividend, const BGC_FP64_DualNumber* const divisor_to_conjugate)
{ {
const double square_modulus = divisor_to_conjugate->real_part * divisor_to_conjugate->real_part; const double square_modulus = divisor_to_conjugate->real_part * divisor_to_conjugate->real_part;
@ -298,13 +298,13 @@ inline int bgc_fp64_dual_vector3_divide_by_conjugate(BGC_FP64_DualVector3* quoti
// ================ Mean of Two ================= // // ================ Mean of Two ================= //
inline void bgc_fp32_dual_vector3_get_mean2(BGC_FP32_DualVector3* mean, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second) inline void bgc_fp32_dual_vector3_get_mean2(BGC_FP32_DualVector3* const mean, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second)
{ {
bgc_fp32_vector3_get_mean2(&mean->real_part, &first->real_part, &second->real_part); bgc_fp32_vector3_get_mean2(&mean->real_part, &first->real_part, &second->real_part);
bgc_fp32_vector3_get_mean2(&mean->dual_part, &first->dual_part, &second->dual_part); bgc_fp32_vector3_get_mean2(&mean->dual_part, &first->dual_part, &second->dual_part);
} }
inline void bgc_fp64_dual_vector3_get_mean2(BGC_FP64_DualVector3* mean, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second) inline void bgc_fp64_dual_vector3_get_mean2(BGC_FP64_DualVector3* const mean, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second)
{ {
bgc_fp64_vector3_get_mean2(&mean->real_part, &first->real_part, &second->real_part); bgc_fp64_vector3_get_mean2(&mean->real_part, &first->real_part, &second->real_part);
bgc_fp64_vector3_get_mean2(&mean->dual_part, &first->dual_part, &second->dual_part); bgc_fp64_vector3_get_mean2(&mean->dual_part, &first->dual_part, &second->dual_part);
@ -312,13 +312,13 @@ inline void bgc_fp64_dual_vector3_get_mean2(BGC_FP64_DualVector3* mean, const BG
// =============== Mean of Three ================ // // =============== Mean of Three ================ //
inline void bgc_fp32_dual_vector3_get_mean3(BGC_FP32_DualVector3* mean, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second, const BGC_FP32_DualVector3* third) inline void bgc_fp32_dual_vector3_get_mean3(BGC_FP32_DualVector3* const mean, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second, const BGC_FP32_DualVector3* const third)
{ {
bgc_fp32_vector3_get_mean3(&mean->real_part, &first->real_part, &second->real_part, &third->real_part); bgc_fp32_vector3_get_mean3(&mean->real_part, &first->real_part, &second->real_part, &third->real_part);
bgc_fp32_vector3_get_mean3(&mean->dual_part, &first->dual_part, &second->dual_part, &third->dual_part); bgc_fp32_vector3_get_mean3(&mean->dual_part, &first->dual_part, &second->dual_part, &third->dual_part);
} }
inline void bgc_fp64_dual_vector3_get_mean3(BGC_FP64_DualVector3* mean, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second, const BGC_FP64_DualVector3* third) inline void bgc_fp64_dual_vector3_get_mean3(BGC_FP64_DualVector3* const mean, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second, const BGC_FP64_DualVector3* const third)
{ {
bgc_fp64_vector3_get_mean3(&mean->real_part, &first->real_part, &second->real_part, &third->real_part); bgc_fp64_vector3_get_mean3(&mean->real_part, &first->real_part, &second->real_part, &third->real_part);
bgc_fp64_vector3_get_mean3(&mean->dual_part, &first->dual_part, &second->dual_part, &third->dual_part); bgc_fp64_vector3_get_mean3(&mean->dual_part, &first->dual_part, &second->dual_part, &third->dual_part);
@ -326,13 +326,13 @@ inline void bgc_fp64_dual_vector3_get_mean3(BGC_FP64_DualVector3* mean, const BG
// ============ Linear Interpolation ============ // // ============ Linear Interpolation ============ //
inline void bgc_fp32_dual_vector3_interpolate(BGC_FP32_DualVector3* interpolation, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second, const float phase) inline void bgc_fp32_dual_vector3_interpolate(BGC_FP32_DualVector3* const interpolation, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second, const float phase)
{ {
bgc_fp32_vector3_interpolate(&interpolation->real_part, &first->real_part, &second->real_part, phase); bgc_fp32_vector3_interpolate(&interpolation->real_part, &first->real_part, &second->real_part, phase);
bgc_fp32_vector3_interpolate(&interpolation->dual_part, &first->dual_part, &second->dual_part, phase); bgc_fp32_vector3_interpolate(&interpolation->dual_part, &first->dual_part, &second->dual_part, phase);
} }
inline void bgc_fp64_dual_vector3_interpolate(BGC_FP64_DualVector3* interpolation, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second, const double phase) inline void bgc_fp64_dual_vector3_interpolate(BGC_FP64_DualVector3* const interpolation, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second, const double phase)
{ {
bgc_fp64_vector3_interpolate(&interpolation->real_part, &first->real_part, &second->real_part, phase); bgc_fp64_vector3_interpolate(&interpolation->real_part, &first->real_part, &second->real_part, phase);
bgc_fp64_vector3_interpolate(&interpolation->dual_part, &first->dual_part, &second->dual_part, phase); bgc_fp64_vector3_interpolate(&interpolation->dual_part, &first->dual_part, &second->dual_part, phase);
@ -340,13 +340,13 @@ inline void bgc_fp64_dual_vector3_interpolate(BGC_FP64_DualVector3* interpolatio
// ================ Dot Product ================= // // ================ Dot Product ================= //
inline void bgc_fp32_dual_vector3_get_dot_product(BGC_FP32_DualNumber* product, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second) inline void bgc_fp32_dual_vector3_get_dot_product(BGC_FP32_DualNumber* const product, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second)
{ {
product->real_part = bgc_fp32_vector3_get_dot_product(&first->real_part, &second->real_part); product->real_part = bgc_fp32_vector3_get_dot_product(&first->real_part, &second->real_part);
product->dual_part = bgc_fp32_vector3_get_dot_product(&first->dual_part, &second->real_part) + bgc_fp32_vector3_get_dot_product(&first->real_part, &second->dual_part); product->dual_part = bgc_fp32_vector3_get_dot_product(&first->dual_part, &second->real_part) + bgc_fp32_vector3_get_dot_product(&first->real_part, &second->dual_part);
} }
inline void bgc_fp64_dual_vector3_get_dot_product(BGC_FP64_DualNumber* product, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second) inline void bgc_fp64_dual_vector3_get_dot_product(BGC_FP64_DualNumber* const product, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second)
{ {
product->real_part = bgc_fp64_vector3_get_dot_product(&first->real_part, &second->real_part); product->real_part = bgc_fp64_vector3_get_dot_product(&first->real_part, &second->real_part);
product->dual_part = bgc_fp64_vector3_get_dot_product(&first->dual_part, &second->real_part) + bgc_fp64_vector3_get_dot_product(&first->real_part, &second->dual_part); product->dual_part = bgc_fp64_vector3_get_dot_product(&first->dual_part, &second->real_part) + bgc_fp64_vector3_get_dot_product(&first->real_part, &second->dual_part);
@ -354,7 +354,7 @@ inline void bgc_fp64_dual_vector3_get_dot_product(BGC_FP64_DualNumber* product,
// =============== Cross Product ================ // // =============== Cross Product ================ //
inline void bgc_fp32_dual_vector3_get_cross_product(BGC_FP32_DualVector3* product, const BGC_FP32_DualVector3* first, const BGC_FP32_DualVector3* second) inline void bgc_fp32_dual_vector3_get_cross_product(BGC_FP32_DualVector3* const product, const BGC_FP32_DualVector3* const first, const BGC_FP32_DualVector3* const second)
{ {
BGC_FP32_Vector3 part1, part2; BGC_FP32_Vector3 part1, part2;
@ -365,7 +365,7 @@ inline void bgc_fp32_dual_vector3_get_cross_product(BGC_FP32_DualVector3* produc
bgc_fp32_vector3_add(&product->dual_part, &part1, &part2); bgc_fp32_vector3_add(&product->dual_part, &part1, &part2);
} }
inline void bgc_fp64_dual_vector3_get_cross_product(BGC_FP64_DualVector3* product, const BGC_FP64_DualVector3* first, const BGC_FP64_DualVector3* second) inline void bgc_fp64_dual_vector3_get_cross_product(BGC_FP64_DualVector3* const product, const BGC_FP64_DualVector3* const first, const BGC_FP64_DualVector3* const second)
{ {
BGC_FP64_Vector3 part1, part2; BGC_FP64_Vector3 part1, part2;

View file

@ -1,94 +1,94 @@
#include "./matrix2x2.h" #include "./matrix2x2.h"
extern inline void bgc_fp32_matrix2x2_reset(BGC_FP32_Matrix2x2* matrix); extern inline void bgc_fp32_matrix2x2_reset(BGC_FP32_Matrix2x2* const matrix);
extern inline void bgc_fp64_matrix2x2_reset(BGC_FP64_Matrix2x2* matrix); extern inline void bgc_fp64_matrix2x2_reset(BGC_FP64_Matrix2x2* const matrix);
extern inline void bgc_fp32_matrix2x2_make_identity(BGC_FP32_Matrix2x2* matrix); extern inline void bgc_fp32_matrix2x2_make_identity(BGC_FP32_Matrix2x2* const matrix);
extern inline void bgc_fp64_matrix2x2_make_identity(BGC_FP64_Matrix2x2* matrix); extern inline void bgc_fp64_matrix2x2_make_identity(BGC_FP64_Matrix2x2* const matrix);
extern inline void bgc_fp32_matrix2x2_make_diagonal(BGC_FP32_Matrix2x2* matrix, const float d1, const float d2); extern inline void bgc_fp32_matrix2x2_make_diagonal(BGC_FP32_Matrix2x2* const matrix, const float d1, const float d2);
extern inline void bgc_fp64_matrix2x2_make_diagonal(BGC_FP64_Matrix2x2* matrix, const double d1, const double d2); extern inline void bgc_fp64_matrix2x2_make_diagonal(BGC_FP64_Matrix2x2* const matrix, const double d1, const double d2);
extern inline void bgc_fp32_matrix2x2_set_turn(BGC_FP32_Matrix2x2* matrix, const float angle, const int angle_unit); extern inline void bgc_fp32_matrix2x2_set_turn(BGC_FP32_Matrix2x2* const matrix, const float angle, const int angle_unit);
extern inline void bgc_fp64_matrix2x2_set_turn(BGC_FP64_Matrix2x2* matrix, const double angle, const int angle_unit); extern inline void bgc_fp64_matrix2x2_set_turn(BGC_FP64_Matrix2x2* const matrix, const double angle, const int angle_unit);
extern inline float bgc_fp32_matrix2x2_get_determinant(const BGC_FP32_Matrix2x2* matrix); extern inline float bgc_fp32_matrix2x2_get_determinant(const BGC_FP32_Matrix2x2* const matrix);
extern inline double bgc_fp64_matrix2x2_get_determinant(const BGC_FP64_Matrix2x2* matrix); extern inline double bgc_fp64_matrix2x2_get_determinant(const BGC_FP64_Matrix2x2* const matrix);
extern inline int bgc_fp32_matrix2x2_is_identity(const BGC_FP32_Matrix2x2* matrix); extern inline int bgc_fp32_matrix2x2_is_identity(const BGC_FP32_Matrix2x2* const matrix);
extern inline int bgc_fp64_matrix2x2_is_identity(const BGC_FP64_Matrix2x2* matrix); extern inline int bgc_fp64_matrix2x2_is_identity(const BGC_FP64_Matrix2x2* const matrix);
extern inline int bgc_fp32_matrix2x2_is_singular(const BGC_FP32_Matrix2x2* matrix); extern inline int bgc_fp32_matrix2x2_is_singular(const BGC_FP32_Matrix2x2* const matrix);
extern inline int bgc_fp64_matrix2x2_is_singular(const BGC_FP64_Matrix2x2* matrix); extern inline int bgc_fp64_matrix2x2_is_singular(const BGC_FP64_Matrix2x2* const matrix);
extern inline int bgc_fp32_matrix2x2_is_rotation(const BGC_FP32_Matrix2x2* matrix); extern inline int bgc_fp32_matrix2x2_is_rotation(const BGC_FP32_Matrix2x2* const matrix);
extern inline int bgc_fp64_matrix2x2_is_rotation(const BGC_FP64_Matrix2x2* matrix); extern inline int bgc_fp64_matrix2x2_is_rotation(const BGC_FP64_Matrix2x2* const matrix);
extern inline void bgc_fp32_matrix2x2_copy(BGC_FP32_Matrix2x2* destination, const BGC_FP32_Matrix2x2* source); extern inline void bgc_fp32_matrix2x2_copy(BGC_FP32_Matrix2x2* const destination, const BGC_FP32_Matrix2x2* const source);
extern inline void bgc_fp64_matrix2x2_copy(BGC_FP64_Matrix2x2* destination, const BGC_FP64_Matrix2x2* source); extern inline void bgc_fp64_matrix2x2_copy(BGC_FP64_Matrix2x2* const destination, const BGC_FP64_Matrix2x2* const source);
extern inline void bgc_fp32_matrix2x2_swap(BGC_FP32_Matrix2x2* matrix1, BGC_FP32_Matrix2x2* matrix2); extern inline void bgc_fp32_matrix2x2_swap(BGC_FP32_Matrix2x2* const matrix1, BGC_FP32_Matrix2x2* const matrix2);
extern inline void bgc_fp64_matrix2x2_swap(BGC_FP64_Matrix2x2* matrix1, BGC_FP64_Matrix2x2* matrix2); extern inline void bgc_fp64_matrix2x2_swap(BGC_FP64_Matrix2x2* const matrix1, BGC_FP64_Matrix2x2* const matrix2);
extern inline void bgc_fp64_matrix2x2_convert_to_fp32(BGC_FP32_Matrix2x2* destination, const BGC_FP64_Matrix2x2* source); extern inline void bgc_fp64_matrix2x2_convert_to_fp32(BGC_FP32_Matrix2x2* const destination, const BGC_FP64_Matrix2x2* const source);
extern inline void bgc_fp32_matrix2x2_convert_to_fp64(BGC_FP64_Matrix2x2* destination, const BGC_FP32_Matrix2x2* source); extern inline void bgc_fp32_matrix2x2_convert_to_fp64(BGC_FP64_Matrix2x2* const destination, const BGC_FP32_Matrix2x2* const source);
extern inline int bgc_fp32_matrix2x2_get_inverse(BGC_FP32_Matrix2x2* inverse, const BGC_FP32_Matrix2x2* matrix); extern inline int bgc_fp32_matrix2x2_get_inverse(BGC_FP32_Matrix2x2* const inverse, const BGC_FP32_Matrix2x2* const matrix);
extern inline int bgc_fp64_matrix2x2_get_inverse(BGC_FP64_Matrix2x2* inverse, const BGC_FP64_Matrix2x2* matrix); extern inline int bgc_fp64_matrix2x2_get_inverse(BGC_FP64_Matrix2x2* const inverse, const BGC_FP64_Matrix2x2* const matrix);
extern inline int bgc_fp32_matrix2x2_invert(BGC_FP32_Matrix2x2* matrix); extern inline int bgc_fp32_matrix2x2_invert(BGC_FP32_Matrix2x2* const matrix);
extern inline int bgc_fp64_matrix2x2_invert(BGC_FP64_Matrix2x2* matrix); extern inline int bgc_fp64_matrix2x2_invert(BGC_FP64_Matrix2x2* const matrix);
extern inline void bgc_fp32_matrix2x2_transpose(BGC_FP32_Matrix2x2* matrix); extern inline void bgc_fp32_matrix2x2_transpose(BGC_FP32_Matrix2x2* const matrix);
extern inline void bgc_fp64_matrix2x2_transpose(BGC_FP64_Matrix2x2* matrix); extern inline void bgc_fp64_matrix2x2_transpose(BGC_FP64_Matrix2x2* const matrix);
extern inline void bgc_fp32_matrix2x2_get_transposed(BGC_FP32_Matrix2x2* transposed, const BGC_FP32_Matrix2x2* matrix); extern inline void bgc_fp32_matrix2x2_get_transposed(BGC_FP32_Matrix2x2* const transposed, const BGC_FP32_Matrix2x2* const matrix);
extern inline void bgc_fp64_matrix2x2_get_transposed(BGC_FP64_Matrix2x2* transposed, const BGC_FP64_Matrix2x2* matrix); extern inline void bgc_fp64_matrix2x2_get_transposed(BGC_FP64_Matrix2x2* const transposed, const BGC_FP64_Matrix2x2* const matrix);
extern inline void bgc_fp32_matrix2x2_get_row(BGC_FP32_Vector2* row, const BGC_FP32_Matrix2x2* matrix, const int row_number); extern inline void bgc_fp32_matrix2x2_get_row(BGC_FP32_Vector2* const row, const BGC_FP32_Matrix2x2* const matrix, const int row_number);
extern inline void bgc_fp64_matrix2x2_get_row(BGC_FP64_Vector2* row, const BGC_FP64_Matrix2x2* matrix, const int row_number); extern inline void bgc_fp64_matrix2x2_get_row(BGC_FP64_Vector2* const row, const BGC_FP64_Matrix2x2* const matrix, const int row_number);
extern inline void bgc_fp32_matrix2x2_set_row(BGC_FP32_Matrix2x2* matrix, const int row_number, const BGC_FP32_Vector2* row); extern inline void bgc_fp32_matrix2x2_set_row(BGC_FP32_Matrix2x2* const matrix, const int row_number, const BGC_FP32_Vector2* const row);
extern inline void bgc_fp64_matrix2x2_set_row(BGC_FP64_Matrix2x2* matrix, const int row_number, const BGC_FP64_Vector2* row); extern inline void bgc_fp64_matrix2x2_set_row(BGC_FP64_Matrix2x2* const matrix, const int row_number, const BGC_FP64_Vector2* const row);
extern inline void bgc_fp32_matrix2x2_get_column(BGC_FP32_Vector2* column, const BGC_FP32_Matrix2x2* matrix, const int column_number); extern inline void bgc_fp32_matrix2x2_get_column(BGC_FP32_Vector2* const column, const BGC_FP32_Matrix2x2* const matrix, const int column_number);
extern inline void bgc_fp64_matrix2x2_get_column(BGC_FP64_Vector2* column, const BGC_FP64_Matrix2x2* matrix, const int column_number); extern inline void bgc_fp64_matrix2x2_get_column(BGC_FP64_Vector2* const column, const BGC_FP64_Matrix2x2* const matrix, const int column_number);
extern inline void bgc_fp32_matrix2x2_set_column(BGC_FP32_Matrix2x2* matrix, const int column_number, const BGC_FP32_Vector2* column); extern inline void bgc_fp32_matrix2x2_set_column(BGC_FP32_Matrix2x2* const matrix, const int column_number, const BGC_FP32_Vector2* const column);
extern inline void bgc_fp64_matrix2x2_set_column(BGC_FP64_Matrix2x2* matrix, const int column_number, const BGC_FP64_Vector2* column); extern inline void bgc_fp64_matrix2x2_set_column(BGC_FP64_Matrix2x2* const matrix, const int column_number, const BGC_FP64_Vector2* const column);
extern inline void bgc_fp32_matrix2x2_add(BGC_FP32_Matrix2x2* sum, const BGC_FP32_Matrix2x2* matrix1, const BGC_FP32_Matrix2x2* matrix2); extern inline void bgc_fp32_matrix2x2_add(BGC_FP32_Matrix2x2* const sum, const BGC_FP32_Matrix2x2* const matrix1, const BGC_FP32_Matrix2x2* const matrix2);
extern inline void bgc_fp64_matrix2x2_add(BGC_FP64_Matrix2x2* sum, const BGC_FP64_Matrix2x2* matrix1, const BGC_FP64_Matrix2x2* matrix2); extern inline void bgc_fp64_matrix2x2_add(BGC_FP64_Matrix2x2* const sum, const BGC_FP64_Matrix2x2* const matrix1, const BGC_FP64_Matrix2x2* const matrix2);
extern inline void bgc_fp32_matrix2x2_add_scaled(BGC_FP32_Matrix2x2* sum, const BGC_FP32_Matrix2x2* basic_matrix, const BGC_FP32_Matrix2x2* scalable_matrix, const float scale); extern inline void bgc_fp32_matrix2x2_add_scaled(BGC_FP32_Matrix2x2* const sum, const BGC_FP32_Matrix2x2* const basic_matrix, const BGC_FP32_Matrix2x2* const scalable_matrix, const float scale);
extern inline void bgc_fp64_matrix2x2_add_scaled(BGC_FP64_Matrix2x2* sum, const BGC_FP64_Matrix2x2* basic_matrix, const BGC_FP64_Matrix2x2* scalable_matrix, const double scale); extern inline void bgc_fp64_matrix2x2_add_scaled(BGC_FP64_Matrix2x2* const sum, const BGC_FP64_Matrix2x2* const basic_matrix, const BGC_FP64_Matrix2x2* const scalable_matrix, const double scale);
extern inline void bgc_fp32_matrix2x2_subtract(BGC_FP32_Matrix2x2* difference, const BGC_FP32_Matrix2x2* minuend, const BGC_FP32_Matrix2x2* subtrahend); extern inline void bgc_fp32_matrix2x2_subtract(BGC_FP32_Matrix2x2* const difference, const BGC_FP32_Matrix2x2* const minuend, const BGC_FP32_Matrix2x2* const subtrahend);
extern inline void bgc_fp64_matrix2x2_subtract(BGC_FP64_Matrix2x2* difference, const BGC_FP64_Matrix2x2* minuend, const BGC_FP64_Matrix2x2* subtrahend); extern inline void bgc_fp64_matrix2x2_subtract(BGC_FP64_Matrix2x2* const difference, const BGC_FP64_Matrix2x2* const minuend, const BGC_FP64_Matrix2x2* const subtrahend);
extern inline void bgc_fp32_matrix2x2_subtract_scaled(BGC_FP32_Matrix2x2* difference, const BGC_FP32_Matrix2x2* basic_matrix, const BGC_FP32_Matrix2x2* scalable_matrix, const float scale); extern inline void bgc_fp32_matrix2x2_subtract_scaled(BGC_FP32_Matrix2x2* const difference, const BGC_FP32_Matrix2x2* const basic_matrix, const BGC_FP32_Matrix2x2* const scalable_matrix, const float scale);
extern inline void bgc_fp64_matrix2x2_subtract_scaled(BGC_FP64_Matrix2x2* difference, const BGC_FP64_Matrix2x2* basic_matrix, const BGC_FP64_Matrix2x2* scalable_matrix, const double scale); extern inline void bgc_fp64_matrix2x2_subtract_scaled(BGC_FP64_Matrix2x2* const difference, const BGC_FP64_Matrix2x2* const basic_matrix, const BGC_FP64_Matrix2x2* const scalable_matrix, const double scale);
extern inline void bgc_fp32_matrix2x2_multiply_by_real(BGC_FP32_Matrix2x2* product, const BGC_FP32_Matrix2x2* multiplicand, const float multiplier); extern inline void bgc_fp32_matrix2x2_multiply_by_real(BGC_FP32_Matrix2x2* const product, const BGC_FP32_Matrix2x2* const multiplicand, const float multiplier);
extern inline void bgc_fp64_matrix2x2_multiply_by_real(BGC_FP64_Matrix2x2* product, const BGC_FP64_Matrix2x2* multiplicand, const double multiplier); extern inline void bgc_fp64_matrix2x2_multiply_by_real(BGC_FP64_Matrix2x2* const product, const BGC_FP64_Matrix2x2* const multiplicand, const double multiplier);
extern inline void bgc_fp32_matrix2x2_multiply_by_vector2(BGC_FP32_Vector2* product, const BGC_FP32_Matrix2x2* matrix, const BGC_FP32_Vector2* vector); extern inline void bgc_fp32_matrix2x2_multiply_by_vector2(BGC_FP32_Vector2* const product, const BGC_FP32_Matrix2x2* const matrix, const BGC_FP32_Vector2* const vector);
extern inline void bgc_fp64_matrix2x2_multiply_by_vector2(BGC_FP64_Vector2* product, const BGC_FP64_Matrix2x2* matrix, const BGC_FP64_Vector2* vector); extern inline void bgc_fp64_matrix2x2_multiply_by_vector2(BGC_FP64_Vector2* const product, const BGC_FP64_Matrix2x2* const matrix, const BGC_FP64_Vector2* const vector);
extern inline void bgc_fp32_matrix2x2_multiply_by_matrix2x2(BGC_FP32_Matrix2x2* product, const BGC_FP32_Matrix2x2* matrix1, const BGC_FP32_Matrix2x2* matrix2); extern inline void bgc_fp32_matrix2x2_multiply_by_matrix2x2(BGC_FP32_Matrix2x2* const product, const BGC_FP32_Matrix2x2* const matrix1, const BGC_FP32_Matrix2x2* const matrix2);
extern inline void bgc_fp64_matrix2x2_multiply_by_matrix2x2(BGC_FP64_Matrix2x2* product, const BGC_FP64_Matrix2x2* matrix1, const BGC_FP64_Matrix2x2* matrix2); extern inline void bgc_fp64_matrix2x2_multiply_by_matrix2x2(BGC_FP64_Matrix2x2* const product, const BGC_FP64_Matrix2x2* const matrix1, const BGC_FP64_Matrix2x2* const matrix2);
extern inline void bgc_fp32_matrix2x2_multiply_by_matrix3x2(BGC_FP32_Matrix3x2* product, const BGC_FP32_Matrix2x2* matrix1, const BGC_FP32_Matrix3x2* matrix2); extern inline void bgc_fp32_matrix2x2_multiply_by_matrix3x2(BGC_FP32_Matrix3x2* const product, const BGC_FP32_Matrix2x2* const matrix1, const BGC_FP32_Matrix3x2* const matrix2);
extern inline void bgc_fp64_matrix2x2_multiply_by_matrix3x2(BGC_FP64_Matrix3x2* product, const BGC_FP64_Matrix2x2* matrix1, const BGC_FP64_Matrix3x2* matrix2); extern inline void bgc_fp64_matrix2x2_multiply_by_matrix3x2(BGC_FP64_Matrix3x2* const product, const BGC_FP64_Matrix2x2* const matrix1, const BGC_FP64_Matrix3x2* const matrix2);
extern inline int bgc_fp32_matrix2x2_divide_by_real(BGC_FP32_Matrix2x2* quotient, const BGC_FP32_Matrix2x2* dividend, const float divisor); extern inline int bgc_fp32_matrix2x2_divide_by_real(BGC_FP32_Matrix2x2* const quotient, const BGC_FP32_Matrix2x2* const dividend, const float divisor);
extern inline int bgc_fp64_matrix2x2_divide_by_real(BGC_FP64_Matrix2x2* quotient, const BGC_FP64_Matrix2x2* dividend, const double divisor); extern inline int bgc_fp64_matrix2x2_divide_by_real(BGC_FP64_Matrix2x2* const quotient, const BGC_FP64_Matrix2x2* const dividend, const double divisor);
extern inline void bgc_fp32_matrix2x2_get_mean2(BGC_FP32_Matrix2x2* mean, const BGC_FP32_Matrix2x2* term1, const BGC_FP32_Matrix2x2* term2); extern inline void bgc_fp32_matrix2x2_get_mean2(BGC_FP32_Matrix2x2* const mean, const BGC_FP32_Matrix2x2* const term1, const BGC_FP32_Matrix2x2* const term2);
extern inline void bgc_fp64_matrix2x2_get_mean2(BGC_FP64_Matrix2x2* mean, const BGC_FP64_Matrix2x2* term1, const BGC_FP64_Matrix2x2* term2); extern inline void bgc_fp64_matrix2x2_get_mean2(BGC_FP64_Matrix2x2* const mean, const BGC_FP64_Matrix2x2* const term1, const BGC_FP64_Matrix2x2* const term2);
extern inline void bgc_fp32_matrix2x2_get_mean3(BGC_FP32_Matrix2x2* mean, const BGC_FP32_Matrix2x2* term1, const BGC_FP32_Matrix2x2* term2, const BGC_FP32_Matrix2x2* term3); extern inline void bgc_fp32_matrix2x2_get_mean3(BGC_FP32_Matrix2x2* const mean, const BGC_FP32_Matrix2x2* const term1, const BGC_FP32_Matrix2x2* const term2, const BGC_FP32_Matrix2x2* const term3);
extern inline void bgc_fp64_matrix2x2_get_mean3(BGC_FP64_Matrix2x2* mean, const BGC_FP64_Matrix2x2* term1, const BGC_FP64_Matrix2x2* term2, const BGC_FP64_Matrix2x2* term3); extern inline void bgc_fp64_matrix2x2_get_mean3(BGC_FP64_Matrix2x2* const mean, const BGC_FP64_Matrix2x2* const term1, const BGC_FP64_Matrix2x2* const term2, const BGC_FP64_Matrix2x2* const term3);
extern inline void bgc_fp32_matrix2x2_interpolate(BGC_FP32_Matrix2x2* interpolation, const BGC_FP32_Matrix2x2* first, const BGC_FP32_Matrix2x2* second, const float phase); extern inline void bgc_fp32_matrix2x2_interpolate(BGC_FP32_Matrix2x2* const interpolation, const BGC_FP32_Matrix2x2* const first, const BGC_FP32_Matrix2x2* const second, const float phase);
extern inline void bgc_fp64_matrix2x2_interpolate(BGC_FP64_Matrix2x2* interpolation, const BGC_FP64_Matrix2x2* first, const BGC_FP64_Matrix2x2* second, const double phase); extern inline void bgc_fp64_matrix2x2_interpolate(BGC_FP64_Matrix2x2* const interpolation, const BGC_FP64_Matrix2x2* const first, const BGC_FP64_Matrix2x2* const second, const double phase);

View file

@ -9,7 +9,7 @@
// =================== Reset ==================== // // =================== Reset ==================== //
inline void bgc_fp32_matrix2x2_reset(BGC_FP32_Matrix2x2* matrix) inline void bgc_fp32_matrix2x2_reset(BGC_FP32_Matrix2x2* const matrix)
{ {
matrix->r1c1 = 0.0f; matrix->r1c1 = 0.0f;
matrix->r1c2 = 0.0f; matrix->r1c2 = 0.0f;
@ -17,7 +17,7 @@ inline void bgc_fp32_matrix2x2_reset(BGC_FP32_Matrix2x2* matrix)
matrix->r2c2 = 0.0f; matrix->r2c2 = 0.0f;
} }
inline void bgc_fp64_matrix2x2_reset(BGC_FP64_Matrix2x2* matrix) inline void bgc_fp64_matrix2x2_reset(BGC_FP64_Matrix2x2* const matrix)
{ {
matrix->r1c1 = 0.0; matrix->r1c1 = 0.0;
matrix->r1c2 = 0.0; matrix->r1c2 = 0.0;
@ -27,7 +27,7 @@ inline void bgc_fp64_matrix2x2_reset(BGC_FP64_Matrix2x2* matrix)
// ================== Identity ================== // // ================== Identity ================== //
inline void bgc_fp32_matrix2x2_make_identity(BGC_FP32_Matrix2x2* matrix) inline void bgc_fp32_matrix2x2_make_identity(BGC_FP32_Matrix2x2* const matrix)
{ {
matrix->r1c1 = 1.0f; matrix->r1c1 = 1.0f;
matrix->r1c2 = 0.0f; matrix->r1c2 = 0.0f;
@ -35,7 +35,7 @@ inline void bgc_fp32_matrix2x2_make_identity(BGC_FP32_Matrix2x2* matrix)
matrix->r2c2 = 1.0f; matrix->r2c2 = 1.0f;
} }
inline void bgc_fp64_matrix2x2_make_identity(BGC_FP64_Matrix2x2* matrix) inline void bgc_fp64_matrix2x2_make_identity(BGC_FP64_Matrix2x2* const matrix)
{ {
matrix->r1c1 = 1.0; matrix->r1c1 = 1.0;
matrix->r1c2 = 0.0; matrix->r1c2 = 0.0;
@ -45,7 +45,7 @@ inline void bgc_fp64_matrix2x2_make_identity(BGC_FP64_Matrix2x2* matrix)
// ================ Set Diagonal ================ // // ================ Set Diagonal ================ //
inline void bgc_fp32_matrix2x2_make_diagonal(BGC_FP32_Matrix2x2* matrix, const float d1, const float d2) inline void bgc_fp32_matrix2x2_make_diagonal(BGC_FP32_Matrix2x2* const matrix, const float d1, const float d2)
{ {
matrix->r1c1 = d1; matrix->r1c1 = d1;
matrix->r1c2 = 0.0f; matrix->r1c2 = 0.0f;
@ -53,7 +53,7 @@ inline void bgc_fp32_matrix2x2_make_diagonal(BGC_FP32_Matrix2x2* matrix, const f
matrix->r2c2 = d2; matrix->r2c2 = d2;
} }
inline void bgc_fp64_matrix2x2_make_diagonal(BGC_FP64_Matrix2x2* matrix, const double d1, const double d2) inline void bgc_fp64_matrix2x2_make_diagonal(BGC_FP64_Matrix2x2* const matrix, const double d1, const double d2)
{ {
matrix->r1c1 = d1; matrix->r1c1 = d1;
matrix->r1c2 = 0.0; matrix->r1c2 = 0.0;
@ -63,7 +63,7 @@ inline void bgc_fp64_matrix2x2_make_diagonal(BGC_FP64_Matrix2x2* matrix, const d
// ============== Rotation Matrix =============== // // ============== Rotation Matrix =============== //
inline void bgc_fp32_matrix2x2_set_turn(BGC_FP32_Matrix2x2* matrix, const float angle, const int angle_unit) inline void bgc_fp32_matrix2x2_set_turn(BGC_FP32_Matrix2x2* const matrix, const float angle, const int angle_unit)
{ {
const float radians = bgc_fp32_angle_to_radians(angle, angle_unit); const float radians = bgc_fp32_angle_to_radians(angle, angle_unit);
const float cosine = cosf(radians); const float cosine = cosf(radians);
@ -75,7 +75,7 @@ inline void bgc_fp32_matrix2x2_set_turn(BGC_FP32_Matrix2x2* matrix, const float
matrix->r2c2 = cosine; matrix->r2c2 = cosine;
} }
inline void bgc_fp64_matrix2x2_set_turn(BGC_FP64_Matrix2x2* matrix, const double angle, const int angle_unit) inline void bgc_fp64_matrix2x2_set_turn(BGC_FP64_Matrix2x2* const matrix, const double angle, const int angle_unit)
{ {
const double radians = bgc_fp64_angle_to_radians(angle, angle_unit); const double radians = bgc_fp64_angle_to_radians(angle, angle_unit);
const double cosine = cos(radians); const double cosine = cos(radians);
@ -89,19 +89,19 @@ inline void bgc_fp64_matrix2x2_set_turn(BGC_FP64_Matrix2x2* matrix, const double
// ================ Determinant ================= // // ================ Determinant ================= //
inline float bgc_fp32_matrix2x2_get_determinant(const BGC_FP32_Matrix2x2* matrix) inline float bgc_fp32_matrix2x2_get_determinant(const BGC_FP32_Matrix2x2* const matrix)
{ {
return matrix->r1c1 * matrix->r2c2 - matrix->r1c2 * matrix->r2c1; return matrix->r1c1 * matrix->r2c2 - matrix->r1c2 * matrix->r2c1;
} }
inline double bgc_fp64_matrix2x2_get_determinant(const BGC_FP64_Matrix2x2* matrix) inline double bgc_fp64_matrix2x2_get_determinant(const BGC_FP64_Matrix2x2* const matrix)
{ {
return matrix->r1c1 * matrix->r2c2 - matrix->r1c2 * matrix->r2c1; return matrix->r1c1 * matrix->r2c2 - matrix->r1c2 * matrix->r2c1;
} }
// ================ Is Identity ================= // // ================ Is Identity ================= //
inline int bgc_fp32_matrix2x2_is_identity(const BGC_FP32_Matrix2x2* matrix) inline int bgc_fp32_matrix2x2_is_identity(const BGC_FP32_Matrix2x2* const matrix)
{ {
return bgc_fp32_is_unit(matrix->r1c1) && bgc_fp32_is_zero(matrix->r1c2) return bgc_fp32_is_unit(matrix->r1c1) && bgc_fp32_is_zero(matrix->r1c2)
&& bgc_fp32_is_zero(matrix->r2c1) && bgc_fp32_is_unit(matrix->r2c2); && bgc_fp32_is_zero(matrix->r2c1) && bgc_fp32_is_unit(matrix->r2c2);
@ -115,19 +115,19 @@ inline int bgc_fp64_matrix2x2_is_identity(const BGC_FP64_Matrix2x2* matrix)
// ================ Is Singular ================= // // ================ Is Singular ================= //
inline int bgc_fp32_matrix2x2_is_singular(const BGC_FP32_Matrix2x2* matrix) inline int bgc_fp32_matrix2x2_is_singular(const BGC_FP32_Matrix2x2* const matrix)
{ {
return bgc_fp32_is_zero(bgc_fp32_matrix2x2_get_determinant(matrix)); return bgc_fp32_is_zero(bgc_fp32_matrix2x2_get_determinant(matrix));
} }
inline int bgc_fp64_matrix2x2_is_singular(const BGC_FP64_Matrix2x2* matrix) inline int bgc_fp64_matrix2x2_is_singular(const BGC_FP64_Matrix2x2* const matrix)
{ {
return bgc_fp64_is_zero(bgc_fp64_matrix2x2_get_determinant(matrix)); return bgc_fp64_is_zero(bgc_fp64_matrix2x2_get_determinant(matrix));
} }
// ================ Is Rotation ================= // // ================ Is Rotation ================= //
inline int bgc_fp32_matrix2x2_is_rotation(const BGC_FP32_Matrix2x2* matrix) inline int bgc_fp32_matrix2x2_is_rotation(const BGC_FP32_Matrix2x2* const matrix)
{ {
BGC_FP32_Matrix2x2 product; BGC_FP32_Matrix2x2 product;
@ -140,7 +140,7 @@ inline int bgc_fp32_matrix2x2_is_rotation(const BGC_FP32_Matrix2x2* matrix)
return bgc_fp32_matrix2x2_is_identity(&product); return bgc_fp32_matrix2x2_is_identity(&product);
} }
inline int bgc_fp64_matrix2x2_is_rotation(const BGC_FP64_Matrix2x2* matrix) inline int bgc_fp64_matrix2x2_is_rotation(const BGC_FP64_Matrix2x2* const matrix)
{ {
BGC_FP64_Matrix2x2 product; BGC_FP64_Matrix2x2 product;
@ -155,7 +155,7 @@ inline int bgc_fp64_matrix2x2_is_rotation(const BGC_FP64_Matrix2x2* matrix)
// ==================== Copy ==================== // // ==================== Copy ==================== //
inline void bgc_fp32_matrix2x2_copy(BGC_FP32_Matrix2x2* destination, const BGC_FP32_Matrix2x2* source) inline void bgc_fp32_matrix2x2_copy(BGC_FP32_Matrix2x2* const destination, const BGC_FP32_Matrix2x2* const source)
{ {
destination->r1c1 = source->r1c1; destination->r1c1 = source->r1c1;
destination->r1c2 = source->r1c2; destination->r1c2 = source->r1c2;
@ -164,7 +164,7 @@ inline void bgc_fp32_matrix2x2_copy(BGC_FP32_Matrix2x2* destination, const BGC_F
destination->r2c2 = source->r2c2; destination->r2c2 = source->r2c2;
} }
inline void bgc_fp64_matrix2x2_copy(BGC_FP64_Matrix2x2* destination, const BGC_FP64_Matrix2x2* source) inline void bgc_fp64_matrix2x2_copy(BGC_FP64_Matrix2x2* const destination, const BGC_FP64_Matrix2x2* const source)
{ {
destination->r1c1 = source->r1c1; destination->r1c1 = source->r1c1;
destination->r1c2 = source->r1c2; destination->r1c2 = source->r1c2;
@ -175,7 +175,7 @@ inline void bgc_fp64_matrix2x2_copy(BGC_FP64_Matrix2x2* destination, const BGC_F
// ==================== Swap ==================== // // ==================== Swap ==================== //
inline void bgc_fp32_matrix2x2_swap(BGC_FP32_Matrix2x2* matrix1, BGC_FP32_Matrix2x2* matrix2) inline void bgc_fp32_matrix2x2_swap(BGC_FP32_Matrix2x2* const matrix1, BGC_FP32_Matrix2x2* const matrix2)
{ {
const float r1c1 = matrix2->r1c1; const float r1c1 = matrix2->r1c1;
const float r1c2 = matrix2->r1c2; const float r1c2 = matrix2->r1c2;
@ -196,7 +196,7 @@ inline void bgc_fp32_matrix2x2_swap(BGC_FP32_Matrix2x2* matrix1, BGC_FP32_Matrix
matrix1->r2c2 = r2c2; matrix1->r2c2 = r2c2;
} }
inline void bgc_fp64_matrix2x2_swap(BGC_FP64_Matrix2x2* matrix1, BGC_FP64_Matrix2x2* matrix2) inline void bgc_fp64_matrix2x2_swap(BGC_FP64_Matrix2x2* const matrix1, BGC_FP64_Matrix2x2* const matrix2)
{ {
const double r1c1 = matrix2->r1c1; const double r1c1 = matrix2->r1c1;
const double r1c2 = matrix2->r1c2; const double r1c2 = matrix2->r1c2;
@ -219,7 +219,7 @@ inline void bgc_fp64_matrix2x2_swap(BGC_FP64_Matrix2x2* matrix1, BGC_FP64_Matrix
// ================== Convert =================== // // ================== Convert =================== //
inline void bgc_fp64_matrix2x2_convert_to_fp32(BGC_FP32_Matrix2x2* destination, const BGC_FP64_Matrix2x2* source) inline void bgc_fp64_matrix2x2_convert_to_fp32(BGC_FP32_Matrix2x2* const destination, const BGC_FP64_Matrix2x2* const source)
{ {
destination->r1c1 = (float)source->r1c1; destination->r1c1 = (float)source->r1c1;
destination->r1c2 = (float)source->r1c2; destination->r1c2 = (float)source->r1c2;
@ -228,7 +228,7 @@ inline void bgc_fp64_matrix2x2_convert_to_fp32(BGC_FP32_Matrix2x2* destination,
destination->r2c2 = (float)source->r2c2; destination->r2c2 = (float)source->r2c2;
} }
inline void bgc_fp32_matrix2x2_convert_to_fp64(BGC_FP64_Matrix2x2* destination, const BGC_FP32_Matrix2x2* source) inline void bgc_fp32_matrix2x2_convert_to_fp64(BGC_FP64_Matrix2x2* const destination, const BGC_FP32_Matrix2x2* const source)
{ {
destination->r1c1 = source->r1c1; destination->r1c1 = source->r1c1;
destination->r1c2 = source->r1c2; destination->r1c2 = source->r1c2;
@ -239,7 +239,7 @@ inline void bgc_fp32_matrix2x2_convert_to_fp64(BGC_FP64_Matrix2x2* destination,
// ================ Get Inverse ================= // // ================ Get Inverse ================= //
inline int bgc_fp32_matrix2x2_get_inverse(BGC_FP32_Matrix2x2* inverse, const BGC_FP32_Matrix2x2* matrix) inline int bgc_fp32_matrix2x2_get_inverse(BGC_FP32_Matrix2x2* const inverse, const BGC_FP32_Matrix2x2* const matrix)
{ {
const float determinant = bgc_fp32_matrix2x2_get_determinant(matrix); const float determinant = bgc_fp32_matrix2x2_get_determinant(matrix);
@ -264,7 +264,7 @@ inline int bgc_fp32_matrix2x2_get_inverse(BGC_FP32_Matrix2x2* inverse, const BGC
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_matrix2x2_get_inverse(BGC_FP64_Matrix2x2* inverse, const BGC_FP64_Matrix2x2* matrix) inline int bgc_fp64_matrix2x2_get_inverse(BGC_FP64_Matrix2x2* const inverse, const BGC_FP64_Matrix2x2* const matrix)
{ {
const double determinant = bgc_fp64_matrix2x2_get_determinant(matrix); const double determinant = bgc_fp64_matrix2x2_get_determinant(matrix);
@ -291,26 +291,26 @@ inline int bgc_fp64_matrix2x2_get_inverse(BGC_FP64_Matrix2x2* inverse, const BGC
// =================== Invert =================== // // =================== Invert =================== //
inline int bgc_fp32_matrix2x2_invert(BGC_FP32_Matrix2x2* matrix) inline int bgc_fp32_matrix2x2_invert(BGC_FP32_Matrix2x2* const matrix)
{ {
return bgc_fp32_matrix2x2_get_inverse(matrix, matrix); return bgc_fp32_matrix2x2_get_inverse(matrix, matrix);
} }
inline int bgc_fp64_matrix2x2_invert(BGC_FP64_Matrix2x2* matrix) inline int bgc_fp64_matrix2x2_invert(BGC_FP64_Matrix2x2* const matrix)
{ {
return bgc_fp64_matrix2x2_get_inverse(matrix, matrix); return bgc_fp64_matrix2x2_get_inverse(matrix, matrix);
} }
// ================= Transpose ================== // // ================= Transpose ================== //
inline void bgc_fp32_matrix2x2_transpose(BGC_FP32_Matrix2x2* matrix) inline void bgc_fp32_matrix2x2_transpose(BGC_FP32_Matrix2x2* const matrix)
{ {
const float r1c2 = matrix->r1c2; const float r1c2 = matrix->r1c2;
matrix->r1c2 = matrix->r2c1; matrix->r1c2 = matrix->r2c1;
matrix->r2c1 = r1c2; matrix->r2c1 = r1c2;
} }
inline void bgc_fp64_matrix2x2_transpose(BGC_FP64_Matrix2x2* matrix) inline void bgc_fp64_matrix2x2_transpose(BGC_FP64_Matrix2x2* const matrix)
{ {
const double r1c2 = matrix->r1c2; const double r1c2 = matrix->r1c2;
matrix->r1c2 = matrix->r2c1; matrix->r1c2 = matrix->r2c1;
@ -319,7 +319,7 @@ inline void bgc_fp64_matrix2x2_transpose(BGC_FP64_Matrix2x2* matrix)
// =============== Get Transpose ================ // // =============== Get Transpose ================ //
inline void bgc_fp32_matrix2x2_get_transposed(BGC_FP32_Matrix2x2* transposed, const BGC_FP32_Matrix2x2* matrix) inline void bgc_fp32_matrix2x2_get_transposed(BGC_FP32_Matrix2x2* const transposed, const BGC_FP32_Matrix2x2* const matrix)
{ {
const float r1c2 = matrix->r1c2; const float r1c2 = matrix->r1c2;
@ -330,7 +330,7 @@ inline void bgc_fp32_matrix2x2_get_transposed(BGC_FP32_Matrix2x2* transposed, co
transposed->r2c2 = matrix->r2c2; transposed->r2c2 = matrix->r2c2;
} }
inline void bgc_fp64_matrix2x2_get_transposed(BGC_FP64_Matrix2x2* transposed, const BGC_FP64_Matrix2x2* matrix) inline void bgc_fp64_matrix2x2_get_transposed(BGC_FP64_Matrix2x2* const transposed, const BGC_FP64_Matrix2x2* const matrix)
{ {
const double r1c2 = matrix->r1c2; const double r1c2 = matrix->r1c2;
@ -343,7 +343,7 @@ inline void bgc_fp64_matrix2x2_get_transposed(BGC_FP64_Matrix2x2* transposed, co
// ================== Get Row =================== // // ================== Get Row =================== //
inline void bgc_fp32_matrix2x2_get_row(BGC_FP32_Vector2* row, const BGC_FP32_Matrix2x2* matrix, const int row_number) inline void bgc_fp32_matrix2x2_get_row(BGC_FP32_Vector2* const row, const BGC_FP32_Matrix2x2* const matrix, const int row_number)
{ {
if (row_number == 1) { if (row_number == 1) {
row->x1 = matrix->r1c1; row->x1 = matrix->r1c1;
@ -361,7 +361,7 @@ inline void bgc_fp32_matrix2x2_get_row(BGC_FP32_Vector2* row, const BGC_FP32_Mat
row->x2 = 0.0f; row->x2 = 0.0f;
} }
inline void bgc_fp64_matrix2x2_get_row(BGC_FP64_Vector2* row, const BGC_FP64_Matrix2x2* matrix, const int row_number) inline void bgc_fp64_matrix2x2_get_row(BGC_FP64_Vector2* const row, const BGC_FP64_Matrix2x2* const matrix, const int row_number)
{ {
if (row_number == 1) { if (row_number == 1) {
row->x1 = matrix->r1c1; row->x1 = matrix->r1c1;
@ -381,7 +381,7 @@ inline void bgc_fp64_matrix2x2_get_row(BGC_FP64_Vector2* row, const BGC_FP64_Mat
// ================== Set Row =================== // // ================== Set Row =================== //
inline void bgc_fp32_matrix2x2_set_row(BGC_FP32_Matrix2x2* matrix, const int row_number, const BGC_FP32_Vector2* row) inline void bgc_fp32_matrix2x2_set_row(BGC_FP32_Matrix2x2* const matrix, const int row_number, const BGC_FP32_Vector2* const row)
{ {
if (row_number == 1) { if (row_number == 1) {
matrix->r1c1 = row->x1; matrix->r1c1 = row->x1;
@ -395,7 +395,7 @@ inline void bgc_fp32_matrix2x2_set_row(BGC_FP32_Matrix2x2* matrix, const int row
} }
} }
inline void bgc_fp64_matrix2x2_set_row(BGC_FP64_Matrix2x2* matrix, const int row_number, const BGC_FP64_Vector2* row) inline void bgc_fp64_matrix2x2_set_row(BGC_FP64_Matrix2x2* const matrix, const int row_number, const BGC_FP64_Vector2* const row)
{ {
if (row_number == 1) { if (row_number == 1) {
matrix->r1c1 = row->x1; matrix->r1c1 = row->x1;
@ -411,7 +411,7 @@ inline void bgc_fp64_matrix2x2_set_row(BGC_FP64_Matrix2x2* matrix, const int row
// ================= Get Column ================= // // ================= Get Column ================= //
inline void bgc_fp32_matrix2x2_get_column(BGC_FP32_Vector2* column, const BGC_FP32_Matrix2x2* matrix, const int column_number) inline void bgc_fp32_matrix2x2_get_column(BGC_FP32_Vector2* const column, const BGC_FP32_Matrix2x2* const matrix, const int column_number)
{ {
if (column_number == 1) { if (column_number == 1) {
column->x1 = matrix->r1c1; column->x1 = matrix->r1c1;
@ -429,7 +429,7 @@ inline void bgc_fp32_matrix2x2_get_column(BGC_FP32_Vector2* column, const BGC_FP
column->x2 = 0.0f; column->x2 = 0.0f;
} }
inline void bgc_fp64_matrix2x2_get_column(BGC_FP64_Vector2* column, const BGC_FP64_Matrix2x2* matrix, const int column_number) inline void bgc_fp64_matrix2x2_get_column(BGC_FP64_Vector2* const column, const BGC_FP64_Matrix2x2* const matrix, const int column_number)
{ {
if (column_number == 1) { if (column_number == 1) {
column->x1 = matrix->r1c1; column->x1 = matrix->r1c1;
@ -449,7 +449,7 @@ inline void bgc_fp64_matrix2x2_get_column(BGC_FP64_Vector2* column, const BGC_FP
// ================= Set Column ================= // // ================= Set Column ================= //
inline void bgc_fp32_matrix2x2_set_column(BGC_FP32_Matrix2x2* matrix, const int column_number, const BGC_FP32_Vector2* column) inline void bgc_fp32_matrix2x2_set_column(BGC_FP32_Matrix2x2* const matrix, const int column_number, const BGC_FP32_Vector2* const column)
{ {
if (column_number == 1) { if (column_number == 1) {
matrix->r1c1 = column->x1; matrix->r1c1 = column->x1;
@ -463,7 +463,7 @@ inline void bgc_fp32_matrix2x2_set_column(BGC_FP32_Matrix2x2* matrix, const int
} }
} }
inline void bgc_fp64_matrix2x2_set_column(BGC_FP64_Matrix2x2* matrix, const int column_number, const BGC_FP64_Vector2* column) inline void bgc_fp64_matrix2x2_set_column(BGC_FP64_Matrix2x2* const matrix, const int column_number, const BGC_FP64_Vector2* const column)
{ {
if (column_number == 1) { if (column_number == 1) {
matrix->r1c1 = column->x1; matrix->r1c1 = column->x1;
@ -479,7 +479,7 @@ inline void bgc_fp64_matrix2x2_set_column(BGC_FP64_Matrix2x2* matrix, const int
// ==================== Add ===================== // // ==================== Add ===================== //
inline void bgc_fp32_matrix2x2_add(BGC_FP32_Matrix2x2* sum, const BGC_FP32_Matrix2x2* matrix1, const BGC_FP32_Matrix2x2* matrix2) inline void bgc_fp32_matrix2x2_add(BGC_FP32_Matrix2x2* const sum, const BGC_FP32_Matrix2x2* const matrix1, const BGC_FP32_Matrix2x2* const matrix2)
{ {
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1; sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2; sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
@ -488,7 +488,7 @@ inline void bgc_fp32_matrix2x2_add(BGC_FP32_Matrix2x2* sum, const BGC_FP32_Matri
sum->r2c2 = matrix1->r2c2 + matrix2->r2c2; sum->r2c2 = matrix1->r2c2 + matrix2->r2c2;
} }
inline void bgc_fp64_matrix2x2_add(BGC_FP64_Matrix2x2* sum, const BGC_FP64_Matrix2x2* matrix1, const BGC_FP64_Matrix2x2* matrix2) inline void bgc_fp64_matrix2x2_add(BGC_FP64_Matrix2x2* const sum, const BGC_FP64_Matrix2x2* const matrix1, const BGC_FP64_Matrix2x2* const matrix2)
{ {
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1; sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2; sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
@ -499,7 +499,7 @@ inline void bgc_fp64_matrix2x2_add(BGC_FP64_Matrix2x2* sum, const BGC_FP64_Matri
// ================= Add Scaled ================= // // ================= Add Scaled ================= //
inline void bgc_fp32_matrix2x2_add_scaled(BGC_FP32_Matrix2x2* sum, const BGC_FP32_Matrix2x2* basic_matrix, const BGC_FP32_Matrix2x2* scalable_matrix, const float scale) inline void bgc_fp32_matrix2x2_add_scaled(BGC_FP32_Matrix2x2* const sum, const BGC_FP32_Matrix2x2* const basic_matrix, const BGC_FP32_Matrix2x2* const scalable_matrix, const float scale)
{ {
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale; sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale; sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
@ -508,7 +508,7 @@ inline void bgc_fp32_matrix2x2_add_scaled(BGC_FP32_Matrix2x2* sum, const BGC_FP3
sum->r2c2 = basic_matrix->r2c2 + scalable_matrix->r2c2 * scale; sum->r2c2 = basic_matrix->r2c2 + scalable_matrix->r2c2 * scale;
} }
inline void bgc_fp64_matrix2x2_add_scaled(BGC_FP64_Matrix2x2* sum, const BGC_FP64_Matrix2x2* basic_matrix, const BGC_FP64_Matrix2x2* scalable_matrix, const double scale) inline void bgc_fp64_matrix2x2_add_scaled(BGC_FP64_Matrix2x2* const sum, const BGC_FP64_Matrix2x2* const basic_matrix, const BGC_FP64_Matrix2x2* const scalable_matrix, const double scale)
{ {
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale; sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale; sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
@ -519,7 +519,7 @@ inline void bgc_fp64_matrix2x2_add_scaled(BGC_FP64_Matrix2x2* sum, const BGC_FP6
// ================== Subtract ================== // // ================== Subtract ================== //
inline void bgc_fp32_matrix2x2_subtract(BGC_FP32_Matrix2x2* difference, const BGC_FP32_Matrix2x2* minuend, const BGC_FP32_Matrix2x2* subtrahend) inline void bgc_fp32_matrix2x2_subtract(BGC_FP32_Matrix2x2* const difference, const BGC_FP32_Matrix2x2* const minuend, const BGC_FP32_Matrix2x2* const subtrahend)
{ {
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1; difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2; difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
@ -528,7 +528,7 @@ inline void bgc_fp32_matrix2x2_subtract(BGC_FP32_Matrix2x2* difference, const BG
difference->r2c2 = minuend->r2c2 - subtrahend->r2c2; difference->r2c2 = minuend->r2c2 - subtrahend->r2c2;
} }
inline void bgc_fp64_matrix2x2_subtract(BGC_FP64_Matrix2x2* difference, const BGC_FP64_Matrix2x2* minuend, const BGC_FP64_Matrix2x2* subtrahend) inline void bgc_fp64_matrix2x2_subtract(BGC_FP64_Matrix2x2* const difference, const BGC_FP64_Matrix2x2* const minuend, const BGC_FP64_Matrix2x2* const subtrahend)
{ {
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1; difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2; difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
@ -539,7 +539,7 @@ inline void bgc_fp64_matrix2x2_subtract(BGC_FP64_Matrix2x2* difference, const BG
// ============== Subtract Scaled =============== // // ============== Subtract Scaled =============== //
inline void bgc_fp32_matrix2x2_subtract_scaled(BGC_FP32_Matrix2x2* difference, const BGC_FP32_Matrix2x2* basic_matrix, const BGC_FP32_Matrix2x2* scalable_matrix, const float scale) inline void bgc_fp32_matrix2x2_subtract_scaled(BGC_FP32_Matrix2x2* const difference, const BGC_FP32_Matrix2x2* const basic_matrix, const BGC_FP32_Matrix2x2* const scalable_matrix, const float scale)
{ {
difference->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale; difference->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale;
difference->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale; difference->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale;
@ -548,7 +548,7 @@ inline void bgc_fp32_matrix2x2_subtract_scaled(BGC_FP32_Matrix2x2* difference, c
difference->r2c2 = basic_matrix->r2c2 - scalable_matrix->r2c2 * scale; difference->r2c2 = basic_matrix->r2c2 - scalable_matrix->r2c2 * scale;
} }
inline void bgc_fp64_matrix2x2_subtract_scaled(BGC_FP64_Matrix2x2* difference, const BGC_FP64_Matrix2x2* basic_matrix, const BGC_FP64_Matrix2x2* scalable_matrix, const double scale) inline void bgc_fp64_matrix2x2_subtract_scaled(BGC_FP64_Matrix2x2* const difference, const BGC_FP64_Matrix2x2* const basic_matrix, const BGC_FP64_Matrix2x2* const scalable_matrix, const double scale)
{ {
difference->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale; difference->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale;
difference->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale; difference->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale;
@ -559,7 +559,7 @@ inline void bgc_fp64_matrix2x2_subtract_scaled(BGC_FP64_Matrix2x2* difference, c
// ================== Multiply ================== // // ================== Multiply ================== //
inline void bgc_fp32_matrix2x2_multiply_by_real(BGC_FP32_Matrix2x2* product, const BGC_FP32_Matrix2x2* multiplicand, const float multiplier) inline void bgc_fp32_matrix2x2_multiply_by_real(BGC_FP32_Matrix2x2* const product, const BGC_FP32_Matrix2x2* const multiplicand, const float multiplier)
{ {
product->r1c1 = multiplicand->r1c1 * multiplier; product->r1c1 = multiplicand->r1c1 * multiplier;
product->r1c2 = multiplicand->r1c2 * multiplier; product->r1c2 = multiplicand->r1c2 * multiplier;
@ -568,7 +568,7 @@ inline void bgc_fp32_matrix2x2_multiply_by_real(BGC_FP32_Matrix2x2* product, con
product->r2c2 = multiplicand->r2c2 * multiplier; product->r2c2 = multiplicand->r2c2 * multiplier;
} }
inline void bgc_fp64_matrix2x2_multiply_by_real(BGC_FP64_Matrix2x2* product, const BGC_FP64_Matrix2x2* multiplicand, const double multiplier) inline void bgc_fp64_matrix2x2_multiply_by_real(BGC_FP64_Matrix2x2* const product, const BGC_FP64_Matrix2x2* const multiplicand, const double multiplier)
{ {
product->r1c1 = multiplicand->r1c1 * multiplier; product->r1c1 = multiplicand->r1c1 * multiplier;
product->r1c2 = multiplicand->r1c2 * multiplier; product->r1c2 = multiplicand->r1c2 * multiplier;
@ -579,7 +579,7 @@ inline void bgc_fp64_matrix2x2_multiply_by_real(BGC_FP64_Matrix2x2* product, con
// ============ Right Vector Product ============ // // ============ Right Vector Product ============ //
inline void bgc_fp32_matrix2x2_multiply_by_vector2(BGC_FP32_Vector2* product, const BGC_FP32_Matrix2x2* matrix, const BGC_FP32_Vector2* vector) inline void bgc_fp32_matrix2x2_multiply_by_vector2(BGC_FP32_Vector2* const product, const BGC_FP32_Matrix2x2* const matrix, const BGC_FP32_Vector2* const vector)
{ {
const float x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2; const float x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
const float x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2; const float x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
@ -588,7 +588,7 @@ inline void bgc_fp32_matrix2x2_multiply_by_vector2(BGC_FP32_Vector2* product, co
product->x2 = x2; product->x2 = x2;
} }
inline void bgc_fp64_matrix2x2_multiply_by_vector2(BGC_FP64_Vector2* product, const BGC_FP64_Matrix2x2* matrix, const BGC_FP64_Vector2* vector) inline void bgc_fp64_matrix2x2_multiply_by_vector2(BGC_FP64_Vector2* const product, const BGC_FP64_Matrix2x2* const matrix, const BGC_FP64_Vector2* const vector)
{ {
const double x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2; const double x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
const double x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2; const double x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
@ -599,7 +599,7 @@ inline void bgc_fp64_matrix2x2_multiply_by_vector2(BGC_FP64_Vector2* product, co
// ========== Matrix Product 2x2 at 2x2 ========= // // ========== Matrix Product 2x2 at 2x2 ========= //
inline void bgc_fp32_matrix2x2_multiply_by_matrix2x2(BGC_FP32_Matrix2x2* product, const BGC_FP32_Matrix2x2* matrix1, const BGC_FP32_Matrix2x2* matrix2) inline void bgc_fp32_matrix2x2_multiply_by_matrix2x2(BGC_FP32_Matrix2x2* const product, const BGC_FP32_Matrix2x2* const matrix1, const BGC_FP32_Matrix2x2* const matrix2)
{ {
const float r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1; const float r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const float r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2; const float r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -614,7 +614,7 @@ inline void bgc_fp32_matrix2x2_multiply_by_matrix2x2(BGC_FP32_Matrix2x2* product
product->r2c2 = r2c2; product->r2c2 = r2c2;
} }
inline void bgc_fp64_matrix2x2_multiply_by_matrix2x2(BGC_FP64_Matrix2x2* product, const BGC_FP64_Matrix2x2* matrix1, const BGC_FP64_Matrix2x2* matrix2) inline void bgc_fp64_matrix2x2_multiply_by_matrix2x2(BGC_FP64_Matrix2x2* const product, const BGC_FP64_Matrix2x2* const matrix1, const BGC_FP64_Matrix2x2* const matrix2)
{ {
const double r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1; const double r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const double r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2; const double r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -631,7 +631,7 @@ inline void bgc_fp64_matrix2x2_multiply_by_matrix2x2(BGC_FP64_Matrix2x2* product
// ========== Matrix Product 2x2 at 3x2 ========= // // ========== Matrix Product 2x2 at 3x2 ========= //
inline void bgc_fp32_matrix2x2_multiply_by_matrix3x2(BGC_FP32_Matrix3x2* product, const BGC_FP32_Matrix2x2* matrix1, const BGC_FP32_Matrix3x2* matrix2) inline void bgc_fp32_matrix2x2_multiply_by_matrix3x2(BGC_FP32_Matrix3x2* const product, const BGC_FP32_Matrix2x2* const matrix1, const BGC_FP32_Matrix3x2* const matrix2)
{ {
const float r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1; const float r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const float r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2; const float r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -650,7 +650,7 @@ inline void bgc_fp32_matrix2x2_multiply_by_matrix3x2(BGC_FP32_Matrix3x2* product
product->r2c3 = r2c3; product->r2c3 = r2c3;
} }
inline void bgc_fp64_matrix2x2_multiply_by_matrix3x2(BGC_FP64_Matrix3x2* product, const BGC_FP64_Matrix2x2* matrix1, const BGC_FP64_Matrix3x2* matrix2) inline void bgc_fp64_matrix2x2_multiply_by_matrix3x2(BGC_FP64_Matrix3x2* const product, const BGC_FP64_Matrix2x2* const matrix1, const BGC_FP64_Matrix3x2* const matrix2)
{ {
const double r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1; const double r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const double r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2; const double r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -671,7 +671,7 @@ inline void bgc_fp64_matrix2x2_multiply_by_matrix3x2(BGC_FP64_Matrix3x2* product
// =================== Divide =================== // // =================== Divide =================== //
inline int bgc_fp32_matrix2x2_divide_by_real(BGC_FP32_Matrix2x2* quotient, const BGC_FP32_Matrix2x2* dividend, const float divisor) inline int bgc_fp32_matrix2x2_divide_by_real(BGC_FP32_Matrix2x2* const quotient, const BGC_FP32_Matrix2x2* const dividend, const float divisor)
{ {
if (bgc_fp32_is_zero(divisor) || isnan(divisor)) { if (bgc_fp32_is_zero(divisor) || isnan(divisor)) {
return BGC_FAILURE; return BGC_FAILURE;
@ -681,7 +681,7 @@ inline int bgc_fp32_matrix2x2_divide_by_real(BGC_FP32_Matrix2x2* quotient, const
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_matrix2x2_divide_by_real(BGC_FP64_Matrix2x2* quotient, const BGC_FP64_Matrix2x2* dividend, const double divisor) inline int bgc_fp64_matrix2x2_divide_by_real(BGC_FP64_Matrix2x2* const quotient, const BGC_FP64_Matrix2x2* const dividend, const double divisor)
{ {
if (bgc_fp64_is_zero(divisor) || isnan(divisor)) { if (bgc_fp64_is_zero(divisor) || isnan(divisor)) {
return BGC_FAILURE; return BGC_FAILURE;
@ -693,7 +693,7 @@ inline int bgc_fp64_matrix2x2_divide_by_real(BGC_FP64_Matrix2x2* quotient, const
// ================== Average2 ================== // // ================== Average2 ================== //
inline void bgc_fp32_matrix2x2_get_mean2(BGC_FP32_Matrix2x2* mean, const BGC_FP32_Matrix2x2* term1, const BGC_FP32_Matrix2x2* term2) inline void bgc_fp32_matrix2x2_get_mean2(BGC_FP32_Matrix2x2* const mean, const BGC_FP32_Matrix2x2* const term1, const BGC_FP32_Matrix2x2* const term2)
{ {
mean->r1c1 = (term1->r1c1 + term2->r1c1) * 0.5f; mean->r1c1 = (term1->r1c1 + term2->r1c1) * 0.5f;
mean->r1c2 = (term1->r1c2 + term2->r1c2) * 0.5f; mean->r1c2 = (term1->r1c2 + term2->r1c2) * 0.5f;
@ -702,7 +702,7 @@ inline void bgc_fp32_matrix2x2_get_mean2(BGC_FP32_Matrix2x2* mean, const BGC_FP3
mean->r2c2 = (term1->r2c2 + term2->r2c2) * 0.5f; mean->r2c2 = (term1->r2c2 + term2->r2c2) * 0.5f;
} }
inline void bgc_fp64_matrix2x2_get_mean2(BGC_FP64_Matrix2x2* mean, const BGC_FP64_Matrix2x2* term1, const BGC_FP64_Matrix2x2* term2) inline void bgc_fp64_matrix2x2_get_mean2(BGC_FP64_Matrix2x2* const mean, const BGC_FP64_Matrix2x2* const term1, const BGC_FP64_Matrix2x2* const term2)
{ {
mean->r1c1 = (term1->r1c1 + term2->r1c1) * 0.5; mean->r1c1 = (term1->r1c1 + term2->r1c1) * 0.5;
mean->r1c2 = (term1->r1c2 + term2->r1c2) * 0.5; mean->r1c2 = (term1->r1c2 + term2->r1c2) * 0.5;
@ -713,7 +713,7 @@ inline void bgc_fp64_matrix2x2_get_mean2(BGC_FP64_Matrix2x2* mean, const BGC_FP6
// ================== Average3 ================== // // ================== Average3 ================== //
inline void bgc_fp32_matrix2x2_get_mean3(BGC_FP32_Matrix2x2* mean, const BGC_FP32_Matrix2x2* term1, const BGC_FP32_Matrix2x2* term2, const BGC_FP32_Matrix2x2* term3) inline void bgc_fp32_matrix2x2_get_mean3(BGC_FP32_Matrix2x2* const mean, const BGC_FP32_Matrix2x2* const term1, const BGC_FP32_Matrix2x2* const term2, const BGC_FP32_Matrix2x2* const term3)
{ {
mean->r1c1 = (term1->r1c1 + term2->r1c1 + term3->r1c1) * BGC_FP32_ONE_THIRD; mean->r1c1 = (term1->r1c1 + term2->r1c1 + term3->r1c1) * BGC_FP32_ONE_THIRD;
mean->r1c2 = (term1->r1c2 + term2->r1c2 + term3->r1c2) * BGC_FP32_ONE_THIRD; mean->r1c2 = (term1->r1c2 + term2->r1c2 + term3->r1c2) * BGC_FP32_ONE_THIRD;
@ -722,7 +722,7 @@ inline void bgc_fp32_matrix2x2_get_mean3(BGC_FP32_Matrix2x2* mean, const BGC_FP3
mean->r2c2 = (term1->r2c2 + term2->r2c2 + term3->r2c2) * BGC_FP32_ONE_THIRD; mean->r2c2 = (term1->r2c2 + term2->r2c2 + term3->r2c2) * BGC_FP32_ONE_THIRD;
} }
inline void bgc_fp64_matrix2x2_get_mean3(BGC_FP64_Matrix2x2* mean, const BGC_FP64_Matrix2x2* term1, const BGC_FP64_Matrix2x2* term2, const BGC_FP64_Matrix2x2* term3) inline void bgc_fp64_matrix2x2_get_mean3(BGC_FP64_Matrix2x2* const mean, const BGC_FP64_Matrix2x2* const term1, const BGC_FP64_Matrix2x2* const term2, const BGC_FP64_Matrix2x2* const term3)
{ {
mean->r1c1 = (term1->r1c1 + term2->r1c1 + term3->r1c1) * BGC_FP64_ONE_THIRD; mean->r1c1 = (term1->r1c1 + term2->r1c1 + term3->r1c1) * BGC_FP64_ONE_THIRD;
mean->r1c2 = (term1->r1c2 + term2->r1c2 + term3->r1c2) * BGC_FP64_ONE_THIRD; mean->r1c2 = (term1->r1c2 + term2->r1c2 + term3->r1c2) * BGC_FP64_ONE_THIRD;
@ -733,7 +733,7 @@ inline void bgc_fp64_matrix2x2_get_mean3(BGC_FP64_Matrix2x2* mean, const BGC_FP6
// ================ Interpolate ================= // // ================ Interpolate ================= //
inline void bgc_fp32_matrix2x2_interpolate(BGC_FP32_Matrix2x2* interpolation, const BGC_FP32_Matrix2x2* first, const BGC_FP32_Matrix2x2* second, const float phase) inline void bgc_fp32_matrix2x2_interpolate(BGC_FP32_Matrix2x2* const interpolation, const BGC_FP32_Matrix2x2* const first, const BGC_FP32_Matrix2x2* const second, const float phase)
{ {
const float counter_phase = 1.0f - phase; const float counter_phase = 1.0f - phase;
@ -744,7 +744,7 @@ inline void bgc_fp32_matrix2x2_interpolate(BGC_FP32_Matrix2x2* interpolation, co
interpolation->r2c2 = first->r2c2 * counter_phase + second->r2c2 * phase; interpolation->r2c2 = first->r2c2 * counter_phase + second->r2c2 * phase;
} }
inline void bgc_fp64_matrix2x2_interpolate(BGC_FP64_Matrix2x2* interpolation, const BGC_FP64_Matrix2x2* first, const BGC_FP64_Matrix2x2* second, const double phase) inline void bgc_fp64_matrix2x2_interpolate(BGC_FP64_Matrix2x2* const interpolation, const BGC_FP64_Matrix2x2* const first, const BGC_FP64_Matrix2x2* const second, const double phase)
{ {
const double counter_phase = 1.0 - phase; const double counter_phase = 1.0 - phase;

View file

@ -1,64 +1,64 @@
#include "./matrix2x3.h" #include "./matrix2x3.h"
extern inline void bgc_fp32_matrix2x3_reset(BGC_FP32_Matrix2x3* matrix); extern inline void bgc_fp32_matrix2x3_reset(BGC_FP32_Matrix2x3* const matrix);
extern inline void bgc_fp64_matrix2x3_reset(BGC_FP64_Matrix2x3* matrix); extern inline void bgc_fp64_matrix2x3_reset(BGC_FP64_Matrix2x3* const matrix);
extern inline void bgc_fp32_matrix2x3_copy(BGC_FP32_Matrix2x3* destination, const BGC_FP32_Matrix2x3* source); extern inline void bgc_fp32_matrix2x3_copy(BGC_FP32_Matrix2x3* const destination, const BGC_FP32_Matrix2x3* const source);
extern inline void bgc_fp64_matrix2x3_copy(BGC_FP64_Matrix2x3* destination, const BGC_FP64_Matrix2x3* source); extern inline void bgc_fp64_matrix2x3_copy(BGC_FP64_Matrix2x3* const destination, const BGC_FP64_Matrix2x3* const source);
extern inline void bgc_fp32_matrix2x3_swap(BGC_FP32_Matrix2x3* matrix1, BGC_FP32_Matrix2x3* matrix2); extern inline void bgc_fp32_matrix2x3_swap(BGC_FP32_Matrix2x3* const matrix1, BGC_FP32_Matrix2x3* const matrix2);
extern inline void bgc_fp64_matrix2x3_swap(BGC_FP64_Matrix2x3* matrix1, BGC_FP64_Matrix2x3* matrix2); extern inline void bgc_fp64_matrix2x3_swap(BGC_FP64_Matrix2x3* const matrix1, BGC_FP64_Matrix2x3* const matrix2);
extern inline void bgc_fp32_matrix2x3_convert_to_fp64(BGC_FP64_Matrix2x3* destination, const BGC_FP32_Matrix2x3* source); extern inline void bgc_fp32_matrix2x3_convert_to_fp64(BGC_FP64_Matrix2x3* const destination, const BGC_FP32_Matrix2x3* const source);
extern inline void bgc_fp64_matrix2x3_convert_to_fp32(BGC_FP32_Matrix2x3* destination, const BGC_FP64_Matrix2x3* source); extern inline void bgc_fp64_matrix2x3_convert_to_fp32(BGC_FP32_Matrix2x3* const destination, const BGC_FP64_Matrix2x3* const source);
extern inline void bgc_fp32_matrix2x3_get_transposed(BGC_FP32_Matrix2x3* transposed, const BGC_FP32_Matrix3x2* matrix); extern inline void bgc_fp32_matrix2x3_get_transposed(BGC_FP32_Matrix2x3* const transposed, const BGC_FP32_Matrix3x2* const matrix);
extern inline void bgc_fp64_matrix2x3_get_transposed(BGC_FP64_Matrix2x3* transposed, const BGC_FP64_Matrix3x2* matrix); extern inline void bgc_fp64_matrix2x3_get_transposed(BGC_FP64_Matrix2x3* const transposed, const BGC_FP64_Matrix3x2* const matrix);
extern inline void bgc_fp32_matrix2x3_get_row(BGC_FP32_Vector2* row, const BGC_FP32_Matrix2x3* matrix, const int row_number); extern inline void bgc_fp32_matrix2x3_get_row(BGC_FP32_Vector2* const row, const BGC_FP32_Matrix2x3* const matrix, const int row_number);
extern inline void bgc_fp64_matrix2x3_get_row(BGC_FP64_Vector2* row, const BGC_FP64_Matrix2x3* matrix, const int row_number); extern inline void bgc_fp64_matrix2x3_get_row(BGC_FP64_Vector2* const row, const BGC_FP64_Matrix2x3* const matrix, const int row_number);
extern inline void bgc_fp32_matrix2x3_set_row(BGC_FP32_Matrix2x3* matrix, const int row_number, const BGC_FP32_Vector2* row); extern inline void bgc_fp32_matrix2x3_set_row(BGC_FP32_Matrix2x3* const matrix, const int row_number, const BGC_FP32_Vector2* const row);
extern inline void bgc_fp64_matrix2x3_set_row(BGC_FP64_Matrix2x3* matrix, const int row_number, const BGC_FP64_Vector2* row); extern inline void bgc_fp64_matrix2x3_set_row(BGC_FP64_Matrix2x3* const matrix, const int row_number, const BGC_FP64_Vector2* const row);
extern inline void bgc_fp32_matrix2x3_get_column(BGC_FP32_Vector3* column, const BGC_FP32_Matrix2x3* matrix, const int column_number); extern inline void bgc_fp32_matrix2x3_get_column(BGC_FP32_Vector3* const column, const BGC_FP32_Matrix2x3* const matrix, const int column_number);
extern inline void bgc_fp64_matrix2x3_get_column(BGC_FP64_Vector3* column, const BGC_FP64_Matrix2x3* matrix, const int column_number); extern inline void bgc_fp64_matrix2x3_get_column(BGC_FP64_Vector3* const column, const BGC_FP64_Matrix2x3* const matrix, const int column_number);
extern inline void bgc_fp32_matrix2x3_set_column(BGC_FP32_Matrix2x3* matrix, const int number, const BGC_FP32_Vector3* column); extern inline void bgc_fp32_matrix2x3_set_column(BGC_FP32_Matrix2x3* const matrix, const int number, const BGC_FP32_Vector3* const column);
extern inline void bgc_fp64_matrix2x3_set_column(BGC_FP64_Matrix2x3* matrix, const int number, const BGC_FP64_Vector3* column); extern inline void bgc_fp64_matrix2x3_set_column(BGC_FP64_Matrix2x3* const matrix, const int number, const BGC_FP64_Vector3* const column);
extern inline void bgc_fp32_matrix2x3_add(BGC_FP32_Matrix2x3* sum, const BGC_FP32_Matrix2x3* matrix1, const BGC_FP32_Matrix2x3* matrix2); extern inline void bgc_fp32_matrix2x3_add(BGC_FP32_Matrix2x3* const sum, const BGC_FP32_Matrix2x3* const matrix1, const BGC_FP32_Matrix2x3* const matrix2);
extern inline void bgc_fp64_matrix2x3_add(BGC_FP64_Matrix2x3* sum, const BGC_FP64_Matrix2x3* matrix1, const BGC_FP64_Matrix2x3* matrix2); extern inline void bgc_fp64_matrix2x3_add(BGC_FP64_Matrix2x3* const sum, const BGC_FP64_Matrix2x3* const matrix1, const BGC_FP64_Matrix2x3* const matrix2);
extern inline void bgc_fp32_matrix2x3_add_scaled(BGC_FP32_Matrix2x3* sum, const BGC_FP32_Matrix2x3* basic_matrix, const BGC_FP32_Matrix2x3* scalable_matrix, const float scale); extern inline void bgc_fp32_matrix2x3_add_scaled(BGC_FP32_Matrix2x3* const sum, const BGC_FP32_Matrix2x3* const basic_matrix, const BGC_FP32_Matrix2x3* const scalable_matrix, const float scale);
extern inline void bgc_fp64_matrix2x3_add_scaled(BGC_FP64_Matrix2x3* sum, const BGC_FP64_Matrix2x3* basic_matrix, const BGC_FP64_Matrix2x3* scalable_matrix, const double scale); extern inline void bgc_fp64_matrix2x3_add_scaled(BGC_FP64_Matrix2x3* const sum, const BGC_FP64_Matrix2x3* const basic_matrix, const BGC_FP64_Matrix2x3* const scalable_matrix, const double scale);
extern inline void bgc_fp32_matrix2x3_subtract(BGC_FP32_Matrix2x3* difference, const BGC_FP32_Matrix2x3* minuend, const BGC_FP32_Matrix2x3* subtrahend); extern inline void bgc_fp32_matrix2x3_subtract(BGC_FP32_Matrix2x3* const difference, const BGC_FP32_Matrix2x3* const minuend, const BGC_FP32_Matrix2x3* const subtrahend);
extern inline void bgc_fp64_matrix2x3_subtract(BGC_FP64_Matrix2x3* difference, const BGC_FP64_Matrix2x3* minuend, const BGC_FP64_Matrix2x3* subtrahend); extern inline void bgc_fp64_matrix2x3_subtract(BGC_FP64_Matrix2x3* const difference, const BGC_FP64_Matrix2x3* const minuend, const BGC_FP64_Matrix2x3* const subtrahend);
extern inline void bgc_fp32_matrix2x3_subtract_scaled(BGC_FP32_Matrix2x3* sum, const BGC_FP32_Matrix2x3* basic_matrix, const BGC_FP32_Matrix2x3* scalable_matrix, const float scale); extern inline void bgc_fp32_matrix2x3_subtract_scaled(BGC_FP32_Matrix2x3* const sum, const BGC_FP32_Matrix2x3* const basic_matrix, const BGC_FP32_Matrix2x3* const scalable_matrix, const float scale);
extern inline void bgc_fp64_matrix2x3_subtract_scaled(BGC_FP64_Matrix2x3* sum, const BGC_FP64_Matrix2x3* basic_matrix, const BGC_FP64_Matrix2x3* scalable_matrix, const double scale); extern inline void bgc_fp64_matrix2x3_subtract_scaled(BGC_FP64_Matrix2x3* const sum, const BGC_FP64_Matrix2x3* const basic_matrix, const BGC_FP64_Matrix2x3* const scalable_matrix, const double scale);
extern inline void bgc_fp32_matrix2x3_multiply_by_real(BGC_FP32_Matrix2x3* product, const BGC_FP32_Matrix2x3* multiplicand, const float multiplier); extern inline void bgc_fp32_matrix2x3_multiply_by_real(BGC_FP32_Matrix2x3* const product, const BGC_FP32_Matrix2x3* const multiplicand, const float multiplier);
extern inline void bgc_fp64_matrix2x3_multiply_by_real(BGC_FP64_Matrix2x3* product, const BGC_FP64_Matrix2x3* multiplicand, const double multiplier); extern inline void bgc_fp64_matrix2x3_multiply_by_real(BGC_FP64_Matrix2x3* const product, const BGC_FP64_Matrix2x3* const multiplicand, const double multiplier);
extern inline void bgc_fp32_matrix2x3_multiply_by_vector2(BGC_FP32_Vector3* product, const BGC_FP32_Matrix2x3* matrix, const BGC_FP32_Vector2* vector); extern inline void bgc_fp32_matrix2x3_multiply_by_vector2(BGC_FP32_Vector3* const product, const BGC_FP32_Matrix2x3* const matrix, const BGC_FP32_Vector2* const vector);
extern inline void bgc_fp64_matrix2x3_multiply_by_vector2(BGC_FP64_Vector3* product, const BGC_FP64_Matrix2x3* matrix, const BGC_FP64_Vector2* vector); extern inline void bgc_fp64_matrix2x3_multiply_by_vector2(BGC_FP64_Vector3* const product, const BGC_FP64_Matrix2x3* const matrix, const BGC_FP64_Vector2* const vector);
extern inline void bgc_fp32_matrix2x3_multiply_by_matrix2x2(BGC_FP32_Matrix2x3* product, const BGC_FP32_Matrix2x3* matrix1, const BGC_FP32_Matrix2x2* matrix2); extern inline void bgc_fp32_matrix2x3_multiply_by_matrix2x2(BGC_FP32_Matrix2x3* const product, const BGC_FP32_Matrix2x3* const matrix1, const BGC_FP32_Matrix2x2* const matrix2);
extern inline void bgc_fp64_matrix2x3_multiply_by_matrix2x2(BGC_FP64_Matrix2x3* product, const BGC_FP64_Matrix2x3* matrix1, const BGC_FP64_Matrix2x2* matrix2); extern inline void bgc_fp64_matrix2x3_multiply_by_matrix2x2(BGC_FP64_Matrix2x3* const product, const BGC_FP64_Matrix2x3* const matrix1, const BGC_FP64_Matrix2x2* const matrix2);
extern inline void bgc_fp32_matrix2x3_multiply_by_matrix3x2(BGC_FP32_Matrix3x3* product, const BGC_FP32_Matrix2x3* matrix1, const BGC_FP32_Matrix3x2* matrix2); extern inline void bgc_fp32_matrix2x3_multiply_by_matrix3x2(BGC_FP32_Matrix3x3* const product, const BGC_FP32_Matrix2x3* const matrix1, const BGC_FP32_Matrix3x2* const matrix2);
extern inline void bgc_fp64_matrix2x3_multiply_by_matrix3x2(BGC_FP64_Matrix3x3* product, const BGC_FP64_Matrix2x3* matrix1, const BGC_FP64_Matrix3x2* matrix2); extern inline void bgc_fp64_matrix2x3_multiply_by_matrix3x2(BGC_FP64_Matrix3x3* const product, const BGC_FP64_Matrix2x3* const matrix1, const BGC_FP64_Matrix3x2* const matrix2);
extern inline int bgc_fp32_matrix2x3_divide_by_real(BGC_FP32_Matrix2x3* quotient, const BGC_FP32_Matrix2x3* dividend, const float divisor); extern inline int bgc_fp32_matrix2x3_divide_by_real(BGC_FP32_Matrix2x3* const quotient, const BGC_FP32_Matrix2x3* const dividend, const float divisor);
extern inline int bgc_fp64_matrix2x3_divide_by_real(BGC_FP64_Matrix2x3* quotient, const BGC_FP64_Matrix2x3* dividend, const double divisor); extern inline int bgc_fp64_matrix2x3_divide_by_real(BGC_FP64_Matrix2x3* const quotient, const BGC_FP64_Matrix2x3* const dividend, const double divisor);
extern inline void bgc_fp32_matrix2x3_get_mean2(BGC_FP32_Matrix2x3* mean, const BGC_FP32_Matrix2x3* term1, const BGC_FP32_Matrix2x3* term2); extern inline void bgc_fp32_matrix2x3_get_mean2(BGC_FP32_Matrix2x3* const mean, const BGC_FP32_Matrix2x3* const term1, const BGC_FP32_Matrix2x3* const term2);
extern inline void bgc_fp64_matrix2x3_get_mean2(BGC_FP64_Matrix2x3* mean, const BGC_FP64_Matrix2x3* term1, const BGC_FP64_Matrix2x3* term2); extern inline void bgc_fp64_matrix2x3_get_mean2(BGC_FP64_Matrix2x3* const mean, const BGC_FP64_Matrix2x3* const term1, const BGC_FP64_Matrix2x3* const term2);
extern inline void bgc_fp32_matrix2x3_get_mean3(BGC_FP32_Matrix2x3* mean, const BGC_FP32_Matrix2x3* term1, const BGC_FP32_Matrix2x3* term2, const BGC_FP32_Matrix2x3* term3); extern inline void bgc_fp32_matrix2x3_get_mean3(BGC_FP32_Matrix2x3* const mean, const BGC_FP32_Matrix2x3* const term1, const BGC_FP32_Matrix2x3* const term2, const BGC_FP32_Matrix2x3* const term3);
extern inline void bgc_fp64_matrix2x3_get_mean3(BGC_FP64_Matrix2x3* mean, const BGC_FP64_Matrix2x3* term1, const BGC_FP64_Matrix2x3* term2, const BGC_FP64_Matrix2x3* term3); extern inline void bgc_fp64_matrix2x3_get_mean3(BGC_FP64_Matrix2x3* const mean, const BGC_FP64_Matrix2x3* const term1, const BGC_FP64_Matrix2x3* const term2, const BGC_FP64_Matrix2x3* const term3);
extern inline void bgc_fp32_matrix2x3_interpolate(BGC_FP32_Matrix2x3* interpolation, const BGC_FP32_Matrix2x3* first, const BGC_FP32_Matrix2x3* second, const float phase); extern inline void bgc_fp32_matrix2x3_interpolate(BGC_FP32_Matrix2x3* const interpolation, const BGC_FP32_Matrix2x3* const first, const BGC_FP32_Matrix2x3* const second, const float phase);
extern inline void bgc_fp64_matrix2x3_interpolate(BGC_FP64_Matrix2x3* interpolation, const BGC_FP64_Matrix2x3* first, const BGC_FP64_Matrix2x3* second, const double phase); extern inline void bgc_fp64_matrix2x3_interpolate(BGC_FP64_Matrix2x3* const interpolation, const BGC_FP64_Matrix2x3* const first, const BGC_FP64_Matrix2x3* const second, const double phase);

View file

@ -8,7 +8,7 @@
// =================== Reset ==================== // // =================== Reset ==================== //
inline void bgc_fp32_matrix2x3_reset(BGC_FP32_Matrix2x3* matrix) inline void bgc_fp32_matrix2x3_reset(BGC_FP32_Matrix2x3* const matrix)
{ {
matrix->r1c1 = 0.0f; matrix->r1c1 = 0.0f;
matrix->r1c2 = 0.0f; matrix->r1c2 = 0.0f;
@ -20,7 +20,7 @@ inline void bgc_fp32_matrix2x3_reset(BGC_FP32_Matrix2x3* matrix)
matrix->r3c2 = 0.0f; matrix->r3c2 = 0.0f;
} }
inline void bgc_fp64_matrix2x3_reset(BGC_FP64_Matrix2x3* matrix) inline void bgc_fp64_matrix2x3_reset(BGC_FP64_Matrix2x3* const matrix)
{ {
matrix->r1c1 = 0.0; matrix->r1c1 = 0.0;
matrix->r1c2 = 0.0; matrix->r1c2 = 0.0;
@ -34,7 +34,7 @@ inline void bgc_fp64_matrix2x3_reset(BGC_FP64_Matrix2x3* matrix)
// ==================== Copy ==================== // // ==================== Copy ==================== //
inline void bgc_fp32_matrix2x3_copy(BGC_FP32_Matrix2x3* destination, const BGC_FP32_Matrix2x3* source) inline void bgc_fp32_matrix2x3_copy(BGC_FP32_Matrix2x3* const destination, const BGC_FP32_Matrix2x3* const source)
{ {
destination->r1c1 = source->r1c1; destination->r1c1 = source->r1c1;
destination->r1c2 = source->r1c2; destination->r1c2 = source->r1c2;
@ -46,7 +46,7 @@ inline void bgc_fp32_matrix2x3_copy(BGC_FP32_Matrix2x3* destination, const BGC_F
destination->r3c2 = source->r3c2; destination->r3c2 = source->r3c2;
} }
inline void bgc_fp64_matrix2x3_copy(BGC_FP64_Matrix2x3* destination, const BGC_FP64_Matrix2x3* source) inline void bgc_fp64_matrix2x3_copy(BGC_FP64_Matrix2x3* const destination, const BGC_FP64_Matrix2x3* const source)
{ {
destination->r1c1 = source->r1c1; destination->r1c1 = source->r1c1;
destination->r1c2 = source->r1c2; destination->r1c2 = source->r1c2;
@ -60,7 +60,7 @@ inline void bgc_fp64_matrix2x3_copy(BGC_FP64_Matrix2x3* destination, const BGC_F
// ==================== Swap ==================== // // ==================== Swap ==================== //
inline void bgc_fp32_matrix2x3_swap(BGC_FP32_Matrix2x3* matrix1, BGC_FP32_Matrix2x3* matrix2) inline void bgc_fp32_matrix2x3_swap(BGC_FP32_Matrix2x3* const matrix1, BGC_FP32_Matrix2x3* const matrix2)
{ {
const float r1c1 = matrix2->r1c1; const float r1c1 = matrix2->r1c1;
const float r1c2 = matrix2->r1c2; const float r1c2 = matrix2->r1c2;
@ -90,7 +90,7 @@ inline void bgc_fp32_matrix2x3_swap(BGC_FP32_Matrix2x3* matrix1, BGC_FP32_Matrix
matrix1->r3c2 = r3c2; matrix1->r3c2 = r3c2;
} }
inline void bgc_fp64_matrix2x3_swap(BGC_FP64_Matrix2x3* matrix1, BGC_FP64_Matrix2x3* matrix2) inline void bgc_fp64_matrix2x3_swap(BGC_FP64_Matrix2x3* const matrix1, BGC_FP64_Matrix2x3* const matrix2)
{ {
const double r1c1 = matrix2->r1c1; const double r1c1 = matrix2->r1c1;
const double r1c2 = matrix2->r1c2; const double r1c2 = matrix2->r1c2;
@ -122,7 +122,7 @@ inline void bgc_fp64_matrix2x3_swap(BGC_FP64_Matrix2x3* matrix1, BGC_FP64_Matrix
// ================== Convert =================== // // ================== Convert =================== //
inline void bgc_fp64_matrix2x3_convert_to_fp32(BGC_FP32_Matrix2x3* destination, const BGC_FP64_Matrix2x3* source) inline void bgc_fp64_matrix2x3_convert_to_fp32(BGC_FP32_Matrix2x3* const destination, const BGC_FP64_Matrix2x3* const source)
{ {
destination->r1c1 = (float)source->r1c1; destination->r1c1 = (float)source->r1c1;
destination->r1c2 = (float)source->r1c2; destination->r1c2 = (float)source->r1c2;
@ -134,7 +134,7 @@ inline void bgc_fp64_matrix2x3_convert_to_fp32(BGC_FP32_Matrix2x3* destination,
destination->r3c2 = (float)source->r3c2; destination->r3c2 = (float)source->r3c2;
} }
inline void bgc_fp32_matrix2x3_convert_to_fp64(BGC_FP64_Matrix2x3* destination, const BGC_FP32_Matrix2x3* source) inline void bgc_fp32_matrix2x3_convert_to_fp64(BGC_FP64_Matrix2x3* const destination, const BGC_FP32_Matrix2x3* const source)
{ {
destination->r1c1 = source->r1c1; destination->r1c1 = source->r1c1;
destination->r1c2 = source->r1c2; destination->r1c2 = source->r1c2;
@ -148,7 +148,7 @@ inline void bgc_fp32_matrix2x3_convert_to_fp64(BGC_FP64_Matrix2x3* destination,
// ================= Transpose ================== // // ================= Transpose ================== //
inline void bgc_fp32_matrix2x3_get_transposed(BGC_FP32_Matrix2x3* transposed, const BGC_FP32_Matrix3x2* matrix) inline void bgc_fp32_matrix2x3_get_transposed(BGC_FP32_Matrix2x3* const transposed, const BGC_FP32_Matrix3x2* const matrix)
{ {
transposed->r1c1 = matrix->r1c1; transposed->r1c1 = matrix->r1c1;
transposed->r1c2 = matrix->r2c1; transposed->r1c2 = matrix->r2c1;
@ -160,7 +160,7 @@ inline void bgc_fp32_matrix2x3_get_transposed(BGC_FP32_Matrix2x3* transposed, co
transposed->r3c2 = matrix->r2c3; transposed->r3c2 = matrix->r2c3;
} }
inline void bgc_fp64_matrix2x3_get_transposed(BGC_FP64_Matrix2x3* transposed, const BGC_FP64_Matrix3x2* matrix) inline void bgc_fp64_matrix2x3_get_transposed(BGC_FP64_Matrix2x3* const transposed, const BGC_FP64_Matrix3x2* const matrix)
{ {
transposed->r1c1 = matrix->r1c1; transposed->r1c1 = matrix->r1c1;
transposed->r1c2 = matrix->r2c1; transposed->r1c2 = matrix->r2c1;
@ -174,7 +174,7 @@ inline void bgc_fp64_matrix2x3_get_transposed(BGC_FP64_Matrix2x3* transposed, co
// ================== Get Row =================== // // ================== Get Row =================== //
inline void bgc_fp32_matrix2x3_get_row(BGC_FP32_Vector2* row, const BGC_FP32_Matrix2x3* matrix, const int row_number) inline void bgc_fp32_matrix2x3_get_row(BGC_FP32_Vector2* const row, const BGC_FP32_Matrix2x3* const matrix, const int row_number)
{ {
if (row_number == 1) { if (row_number == 1) {
row->x1 = matrix->r1c1; row->x1 = matrix->r1c1;
@ -198,7 +198,7 @@ inline void bgc_fp32_matrix2x3_get_row(BGC_FP32_Vector2* row, const BGC_FP32_Mat
row->x2 = 0.0f; row->x2 = 0.0f;
} }
inline void bgc_fp64_matrix2x3_get_row(BGC_FP64_Vector2* row, const BGC_FP64_Matrix2x3* matrix, const int row_number) inline void bgc_fp64_matrix2x3_get_row(BGC_FP64_Vector2* const row, const BGC_FP64_Matrix2x3* const matrix, const int row_number)
{ {
if (row_number == 1) { if (row_number == 1) {
row->x1 = matrix->r1c1; row->x1 = matrix->r1c1;
@ -224,7 +224,7 @@ inline void bgc_fp64_matrix2x3_get_row(BGC_FP64_Vector2* row, const BGC_FP64_Mat
// ================== Set Row =================== // // ================== Set Row =================== //
inline void bgc_fp32_matrix2x3_set_row(BGC_FP32_Matrix2x3* matrix, const int row_number, const BGC_FP32_Vector2* row) inline void bgc_fp32_matrix2x3_set_row(BGC_FP32_Matrix2x3* const matrix, const int row_number, const BGC_FP32_Vector2* const row)
{ {
if (row_number == 1) { if (row_number == 1) {
matrix->r1c1 = row->x1; matrix->r1c1 = row->x1;
@ -244,7 +244,7 @@ inline void bgc_fp32_matrix2x3_set_row(BGC_FP32_Matrix2x3* matrix, const int row
} }
} }
inline void bgc_fp64_matrix2x3_set_row(BGC_FP64_Matrix2x3* matrix, const int row_number, const BGC_FP64_Vector2* row) inline void bgc_fp64_matrix2x3_set_row(BGC_FP64_Matrix2x3* const matrix, const int row_number, const BGC_FP64_Vector2* const row)
{ {
if (row_number == 1) { if (row_number == 1) {
matrix->r1c1 = row->x1; matrix->r1c1 = row->x1;
@ -266,7 +266,7 @@ inline void bgc_fp64_matrix2x3_set_row(BGC_FP64_Matrix2x3* matrix, const int row
// ================= Get Column ================= // // ================= Get Column ================= //
inline void bgc_fp32_matrix2x3_get_column(BGC_FP32_Vector3* column, const BGC_FP32_Matrix2x3* matrix, const int column_number) inline void bgc_fp32_matrix2x3_get_column(BGC_FP32_Vector3* const column, const BGC_FP32_Matrix2x3* const matrix, const int column_number)
{ {
if (column_number == 1) { if (column_number == 1) {
column->x1 = matrix->r1c1; column->x1 = matrix->r1c1;
@ -282,7 +282,7 @@ inline void bgc_fp32_matrix2x3_get_column(BGC_FP32_Vector3* column, const BGC_FP
} }
} }
inline void bgc_fp64_matrix2x3_get_column(BGC_FP64_Vector3* column, const BGC_FP64_Matrix2x3* matrix, const int column_number) inline void bgc_fp64_matrix2x3_get_column(BGC_FP64_Vector3* const column, const BGC_FP64_Matrix2x3* const matrix, const int column_number)
{ {
if (column_number == 1) { if (column_number == 1) {
column->x1 = matrix->r1c1; column->x1 = matrix->r1c1;
@ -300,7 +300,7 @@ inline void bgc_fp64_matrix2x3_get_column(BGC_FP64_Vector3* column, const BGC_FP
// ================= Set Column ================= // // ================= Set Column ================= //
inline void bgc_fp32_matrix2x3_set_column(BGC_FP32_Matrix2x3* matrix, const int column_number, const BGC_FP32_Vector3* column) inline void bgc_fp32_matrix2x3_set_column(BGC_FP32_Matrix2x3* const matrix, const int column_number, const BGC_FP32_Vector3* const column)
{ {
if (column_number == 1) { if (column_number == 1) {
matrix->r1c1 = column->x1; matrix->r1c1 = column->x1;
@ -316,7 +316,7 @@ inline void bgc_fp32_matrix2x3_set_column(BGC_FP32_Matrix2x3* matrix, const int
} }
} }
inline void bgc_fp64_matrix2x3_set_column(BGC_FP64_Matrix2x3* matrix, const int column_number, const BGC_FP64_Vector3* column) inline void bgc_fp64_matrix2x3_set_column(BGC_FP64_Matrix2x3* const matrix, const int column_number, const BGC_FP64_Vector3* const column)
{ {
if (column_number == 1) { if (column_number == 1) {
matrix->r1c1 = column->x1; matrix->r1c1 = column->x1;
@ -334,7 +334,7 @@ inline void bgc_fp64_matrix2x3_set_column(BGC_FP64_Matrix2x3* matrix, const int
// ==================== Add ===================== // // ==================== Add ===================== //
inline void bgc_fp32_matrix2x3_add(BGC_FP32_Matrix2x3* sum, const BGC_FP32_Matrix2x3* matrix1, const BGC_FP32_Matrix2x3* matrix2) inline void bgc_fp32_matrix2x3_add(BGC_FP32_Matrix2x3* const sum, const BGC_FP32_Matrix2x3* const matrix1, const BGC_FP32_Matrix2x3* const matrix2)
{ {
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1; sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2; sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
@ -346,7 +346,7 @@ inline void bgc_fp32_matrix2x3_add(BGC_FP32_Matrix2x3* sum, const BGC_FP32_Matri
sum->r3c2 = matrix1->r3c2 + matrix2->r3c2; sum->r3c2 = matrix1->r3c2 + matrix2->r3c2;
} }
inline void bgc_fp64_matrix2x3_add(BGC_FP64_Matrix2x3* sum, const BGC_FP64_Matrix2x3* matrix1, const BGC_FP64_Matrix2x3* matrix2) inline void bgc_fp64_matrix2x3_add(BGC_FP64_Matrix2x3* const sum, const BGC_FP64_Matrix2x3* const matrix1, const BGC_FP64_Matrix2x3* const matrix2)
{ {
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1; sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2; sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
@ -360,7 +360,7 @@ inline void bgc_fp64_matrix2x3_add(BGC_FP64_Matrix2x3* sum, const BGC_FP64_Matri
// ================= Add Scaled ================= // // ================= Add Scaled ================= //
inline void bgc_fp32_matrix2x3_add_scaled(BGC_FP32_Matrix2x3* sum, const BGC_FP32_Matrix2x3* basic_matrix, const BGC_FP32_Matrix2x3* scalable_matrix, const float scale) inline void bgc_fp32_matrix2x3_add_scaled(BGC_FP32_Matrix2x3* const sum, const BGC_FP32_Matrix2x3* const basic_matrix, const BGC_FP32_Matrix2x3* const scalable_matrix, const float scale)
{ {
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale; sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale; sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
@ -372,7 +372,7 @@ inline void bgc_fp32_matrix2x3_add_scaled(BGC_FP32_Matrix2x3* sum, const BGC_FP3
sum->r3c2 = basic_matrix->r3c2 + scalable_matrix->r3c2 * scale; sum->r3c2 = basic_matrix->r3c2 + scalable_matrix->r3c2 * scale;
} }
inline void bgc_fp64_matrix2x3_add_scaled(BGC_FP64_Matrix2x3* sum, const BGC_FP64_Matrix2x3* basic_matrix, const BGC_FP64_Matrix2x3* scalable_matrix, const double scale) inline void bgc_fp64_matrix2x3_add_scaled(BGC_FP64_Matrix2x3* const sum, const BGC_FP64_Matrix2x3* const basic_matrix, const BGC_FP64_Matrix2x3* const scalable_matrix, const double scale)
{ {
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale; sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale; sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
@ -386,7 +386,7 @@ inline void bgc_fp64_matrix2x3_add_scaled(BGC_FP64_Matrix2x3* sum, const BGC_FP6
// ================== Subtract ================== // // ================== Subtract ================== //
inline void bgc_fp32_matrix2x3_subtract(BGC_FP32_Matrix2x3* difference, const BGC_FP32_Matrix2x3* minuend, const BGC_FP32_Matrix2x3* subtrahend) inline void bgc_fp32_matrix2x3_subtract(BGC_FP32_Matrix2x3* const difference, const BGC_FP32_Matrix2x3* const minuend, const BGC_FP32_Matrix2x3* const subtrahend)
{ {
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1; difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2; difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
@ -398,7 +398,7 @@ inline void bgc_fp32_matrix2x3_subtract(BGC_FP32_Matrix2x3* difference, const BG
difference->r3c2 = minuend->r3c2 - subtrahend->r3c2; difference->r3c2 = minuend->r3c2 - subtrahend->r3c2;
} }
inline void bgc_fp64_matrix2x3_subtract(BGC_FP64_Matrix2x3* difference, const BGC_FP64_Matrix2x3* minuend, const BGC_FP64_Matrix2x3* subtrahend) inline void bgc_fp64_matrix2x3_subtract(BGC_FP64_Matrix2x3* const difference, const BGC_FP64_Matrix2x3* const minuend, const BGC_FP64_Matrix2x3* const subtrahend)
{ {
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1; difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2; difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
@ -412,7 +412,7 @@ inline void bgc_fp64_matrix2x3_subtract(BGC_FP64_Matrix2x3* difference, const BG
// ============== Subtract scaled =============== // // ============== Subtract scaled =============== //
inline void bgc_fp32_matrix2x3_subtract_scaled(BGC_FP32_Matrix2x3* sum, const BGC_FP32_Matrix2x3* basic_matrix, const BGC_FP32_Matrix2x3* scalable_matrix, const float scale) inline void bgc_fp32_matrix2x3_subtract_scaled(BGC_FP32_Matrix2x3* const sum, const BGC_FP32_Matrix2x3* const basic_matrix, const BGC_FP32_Matrix2x3* const scalable_matrix, const float scale)
{ {
sum->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale; sum->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale;
sum->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale; sum->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale;
@ -424,7 +424,7 @@ inline void bgc_fp32_matrix2x3_subtract_scaled(BGC_FP32_Matrix2x3* sum, const BG
sum->r3c2 = basic_matrix->r3c2 - scalable_matrix->r3c2 * scale; sum->r3c2 = basic_matrix->r3c2 - scalable_matrix->r3c2 * scale;
} }
inline void bgc_fp64_matrix2x3_subtract_scaled(BGC_FP64_Matrix2x3* sum, const BGC_FP64_Matrix2x3* basic_matrix, const BGC_FP64_Matrix2x3* scalable_matrix, const double scale) inline void bgc_fp64_matrix2x3_subtract_scaled(BGC_FP64_Matrix2x3* const sum, const BGC_FP64_Matrix2x3* const basic_matrix, const BGC_FP64_Matrix2x3* const scalable_matrix, const double scale)
{ {
sum->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale; sum->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale;
sum->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale; sum->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale;
@ -438,7 +438,7 @@ inline void bgc_fp64_matrix2x3_subtract_scaled(BGC_FP64_Matrix2x3* sum, const BG
// ================== Multiply ================== // // ================== Multiply ================== //
inline void bgc_fp32_matrix2x3_multiply_by_real(BGC_FP32_Matrix2x3* product, const BGC_FP32_Matrix2x3* multiplicand, const float multiplier) inline void bgc_fp32_matrix2x3_multiply_by_real(BGC_FP32_Matrix2x3* const product, const BGC_FP32_Matrix2x3* const multiplicand, const float multiplier)
{ {
product->r1c1 = multiplicand->r1c1 * multiplier; product->r1c1 = multiplicand->r1c1 * multiplier;
product->r1c2 = multiplicand->r1c2 * multiplier; product->r1c2 = multiplicand->r1c2 * multiplier;
@ -450,7 +450,7 @@ inline void bgc_fp32_matrix2x3_multiply_by_real(BGC_FP32_Matrix2x3* product, con
product->r3c2 = multiplicand->r3c2 * multiplier; product->r3c2 = multiplicand->r3c2 * multiplier;
} }
inline void bgc_fp64_matrix2x3_multiply_by_real(BGC_FP64_Matrix2x3* product, const BGC_FP64_Matrix2x3* multiplicand, const double multiplier) inline void bgc_fp64_matrix2x3_multiply_by_real(BGC_FP64_Matrix2x3* const product, const BGC_FP64_Matrix2x3* const multiplicand, const double multiplier)
{ {
product->r1c1 = multiplicand->r1c1 * multiplier; product->r1c1 = multiplicand->r1c1 * multiplier;
product->r1c2 = multiplicand->r1c2 * multiplier; product->r1c2 = multiplicand->r1c2 * multiplier;
@ -464,14 +464,14 @@ inline void bgc_fp64_matrix2x3_multiply_by_real(BGC_FP64_Matrix2x3* product, con
// ============ Right Vector Product ============ // // ============ Right Vector Product ============ //
inline void bgc_fp32_matrix2x3_multiply_by_vector2(BGC_FP32_Vector3* product, const BGC_FP32_Matrix2x3* matrix, const BGC_FP32_Vector2* vector) inline void bgc_fp32_matrix2x3_multiply_by_vector2(BGC_FP32_Vector3* const product, const BGC_FP32_Matrix2x3* const matrix, const BGC_FP32_Vector2* vector)
{ {
product->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2; product->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
product->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2; product->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
product->x3 = matrix->r3c1 * vector->x1 + matrix->r3c2 * vector->x2; product->x3 = matrix->r3c1 * vector->x1 + matrix->r3c2 * vector->x2;
} }
inline void bgc_fp64_matrix2x3_multiply_by_vector2(BGC_FP64_Vector3* product, const BGC_FP64_Matrix2x3* matrix, const BGC_FP64_Vector2* vector) inline void bgc_fp64_matrix2x3_multiply_by_vector2(BGC_FP64_Vector3* const product, const BGC_FP64_Matrix2x3* const matrix, const BGC_FP64_Vector2* vector)
{ {
product->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2; product->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
product->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2; product->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
@ -481,7 +481,7 @@ inline void bgc_fp64_matrix2x3_multiply_by_vector2(BGC_FP64_Vector3* product, co
// ========== Matrix Product 2x3 at 2x2 ========= // // ========== Matrix Product 2x3 at 2x2 ========= //
inline void bgc_fp32_matrix2x3_multiply_by_matrix2x2(BGC_FP32_Matrix2x3* product, const BGC_FP32_Matrix2x3* matrix1, const BGC_FP32_Matrix2x2* matrix2) inline void bgc_fp32_matrix2x3_multiply_by_matrix2x2(BGC_FP32_Matrix2x3* const product, const BGC_FP32_Matrix2x3* const matrix1, const BGC_FP32_Matrix2x2* const matrix2)
{ {
const float r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1; const float r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const float r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2; const float r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -502,7 +502,7 @@ inline void bgc_fp32_matrix2x3_multiply_by_matrix2x2(BGC_FP32_Matrix2x3* product
product->r3c2 = r3c2; product->r3c2 = r3c2;
} }
inline void bgc_fp64_matrix2x3_multiply_by_matrix2x2(BGC_FP64_Matrix2x3* product, const BGC_FP64_Matrix2x3* matrix1, const BGC_FP64_Matrix2x2* matrix2) inline void bgc_fp64_matrix2x3_multiply_by_matrix2x2(BGC_FP64_Matrix2x3* const product, const BGC_FP64_Matrix2x3* const matrix1, const BGC_FP64_Matrix2x2* const matrix2)
{ {
const double r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1; const double r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const double r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2; const double r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -525,7 +525,7 @@ inline void bgc_fp64_matrix2x3_multiply_by_matrix2x2(BGC_FP64_Matrix2x3* product
// ========== Matrix Product 2x3 at 3x2 ========= // // ========== Matrix Product 2x3 at 3x2 ========= //
inline void bgc_fp32_matrix2x3_multiply_by_matrix3x2(BGC_FP32_Matrix3x3* product, const BGC_FP32_Matrix2x3* matrix1, const BGC_FP32_Matrix3x2* matrix2) inline void bgc_fp32_matrix2x3_multiply_by_matrix3x2(BGC_FP32_Matrix3x3* const product, const BGC_FP32_Matrix2x3* const matrix1, const BGC_FP32_Matrix3x2* const matrix2)
{ {
product->r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1; product->r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
product->r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2; product->r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -540,7 +540,7 @@ inline void bgc_fp32_matrix2x3_multiply_by_matrix3x2(BGC_FP32_Matrix3x3* product
product->r3c3 = matrix1->r3c1 * matrix2->r1c3 + matrix1->r3c2 * matrix2->r2c3; product->r3c3 = matrix1->r3c1 * matrix2->r1c3 + matrix1->r3c2 * matrix2->r2c3;
} }
inline void bgc_fp64_matrix2x3_multiply_by_matrix3x2(BGC_FP64_Matrix3x3* product, const BGC_FP64_Matrix2x3* matrix1, const BGC_FP64_Matrix3x2* matrix2) inline void bgc_fp64_matrix2x3_multiply_by_matrix3x2(BGC_FP64_Matrix3x3* const product, const BGC_FP64_Matrix2x3* const matrix1, const BGC_FP64_Matrix3x2* const matrix2)
{ {
product->r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1; product->r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
product->r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2; product->r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -557,7 +557,7 @@ inline void bgc_fp64_matrix2x3_multiply_by_matrix3x2(BGC_FP64_Matrix3x3* product
// =================== Divide =================== // // =================== Divide =================== //
inline int bgc_fp32_matrix2x3_divide_by_real(BGC_FP32_Matrix2x3* quotient, const BGC_FP32_Matrix2x3* dividend, const float divisor) inline int bgc_fp32_matrix2x3_divide_by_real(BGC_FP32_Matrix2x3* const quotient, const BGC_FP32_Matrix2x3* const dividend, const float divisor)
{ {
if (bgc_fp32_is_zero(divisor)) { if (bgc_fp32_is_zero(divisor)) {
return BGC_FAILURE; return BGC_FAILURE;
@ -567,7 +567,7 @@ inline int bgc_fp32_matrix2x3_divide_by_real(BGC_FP32_Matrix2x3* quotient, const
return BGC_SUCCESS; return BGC_SUCCESS;
} }
inline int bgc_fp64_matrix2x3_divide_by_real(BGC_FP64_Matrix2x3* quotient, const BGC_FP64_Matrix2x3* dividend, const double divisor) inline int bgc_fp64_matrix2x3_divide_by_real(BGC_FP64_Matrix2x3* const quotient, const BGC_FP64_Matrix2x3* const dividend, const double divisor)
{ {
if (bgc_fp64_is_zero(divisor)) { if (bgc_fp64_is_zero(divisor)) {
return BGC_FAILURE; return BGC_FAILURE;
@ -579,7 +579,7 @@ inline int bgc_fp64_matrix2x3_divide_by_real(BGC_FP64_Matrix2x3* quotient, const
// ================== Average2 ================== // // ================== Average2 ================== //
inline void bgc_fp32_matrix2x3_get_mean2(BGC_FP32_Matrix2x3* mean, const BGC_FP32_Matrix2x3* term1, const BGC_FP32_Matrix2x3* term2) inline void bgc_fp32_matrix2x3_get_mean2(BGC_FP32_Matrix2x3* const mean, const BGC_FP32_Matrix2x3* const term1, const BGC_FP32_Matrix2x3* const term2)
{ {
mean->r1c1 = (term1->r1c1 + term2->r1c1) * 0.5f; mean->r1c1 = (term1->r1c1 + term2->r1c1) * 0.5f;
mean->r1c2 = (term1->r1c2 + term2->r1c2) * 0.5f; mean->r1c2 = (term1->r1c2 + term2->r1c2) * 0.5f;
@ -591,7 +591,7 @@ inline void bgc_fp32_matrix2x3_get_mean2(BGC_FP32_Matrix2x3* mean, const BGC_FP3
mean->r3c2 = (term1->r3c2 + term2->r3c2) * 0.5f; mean->r3c2 = (term1->r3c2 + term2->r3c2) * 0.5f;
} }
inline void bgc_fp64_matrix2x3_get_mean2(BGC_FP64_Matrix2x3* mean, const BGC_FP64_Matrix2x3* term1, const BGC_FP64_Matrix2x3* term2) inline void bgc_fp64_matrix2x3_get_mean2(BGC_FP64_Matrix2x3* const mean, const BGC_FP64_Matrix2x3* const term1, const BGC_FP64_Matrix2x3* const term2)
{ {
mean->r1c1 = (term1->r1c1 + term2->r1c1) * 0.5; mean->r1c1 = (term1->r1c1 + term2->r1c1) * 0.5;
mean->r1c2 = (term1->r1c2 + term2->r1c2) * 0.5; mean->r1c2 = (term1->r1c2 + term2->r1c2) * 0.5;
@ -605,7 +605,7 @@ inline void bgc_fp64_matrix2x3_get_mean2(BGC_FP64_Matrix2x3* mean, const BGC_FP6
// ================== Average3 ================== // // ================== Average3 ================== //
inline void bgc_fp32_matrix2x3_get_mean3(BGC_FP32_Matrix2x3* mean, const BGC_FP32_Matrix2x3* term1, const BGC_FP32_Matrix2x3* term2, const BGC_FP32_Matrix2x3* term3) inline void bgc_fp32_matrix2x3_get_mean3(BGC_FP32_Matrix2x3* const mean, const BGC_FP32_Matrix2x3* const term1, const BGC_FP32_Matrix2x3* const term2, const BGC_FP32_Matrix2x3* const term3)
{ {
mean->r1c1 = (term1->r1c1 + term2->r1c1 + term3->r1c1) * BGC_FP32_ONE_THIRD; mean->r1c1 = (term1->r1c1 + term2->r1c1 + term3->r1c1) * BGC_FP32_ONE_THIRD;
mean->r1c2 = (term1->r1c2 + term2->r1c2 + term3->r1c2) * BGC_FP32_ONE_THIRD; mean->r1c2 = (term1->r1c2 + term2->r1c2 + term3->r1c2) * BGC_FP32_ONE_THIRD;
@ -617,7 +617,7 @@ inline void bgc_fp32_matrix2x3_get_mean3(BGC_FP32_Matrix2x3* mean, const BGC_FP3
mean->r3c2 = (term1->r3c2 + term2->r3c2 + term3->r3c2) * BGC_FP32_ONE_THIRD; mean->r3c2 = (term1->r3c2 + term2->r3c2 + term3->r3c2) * BGC_FP32_ONE_THIRD;
} }
inline void bgc_fp64_matrix2x3_get_mean3(BGC_FP64_Matrix2x3* mean, const BGC_FP64_Matrix2x3* term1, const BGC_FP64_Matrix2x3* term2, const BGC_FP64_Matrix2x3* term3) inline void bgc_fp64_matrix2x3_get_mean3(BGC_FP64_Matrix2x3* const mean, const BGC_FP64_Matrix2x3* const term1, const BGC_FP64_Matrix2x3* const term2, const BGC_FP64_Matrix2x3* const term3)
{ {
mean->r1c1 = (term1->r1c1 + term2->r1c1 + term3->r1c1) * BGC_FP64_ONE_THIRD; mean->r1c1 = (term1->r1c1 + term2->r1c1 + term3->r1c1) * BGC_FP64_ONE_THIRD;
mean->r1c2 = (term1->r1c2 + term2->r1c2 + term3->r1c2) * BGC_FP64_ONE_THIRD; mean->r1c2 = (term1->r1c2 + term2->r1c2 + term3->r1c2) * BGC_FP64_ONE_THIRD;
@ -631,7 +631,7 @@ inline void bgc_fp64_matrix2x3_get_mean3(BGC_FP64_Matrix2x3* mean, const BGC_FP6
// ================ Interpolate ================= // // ================ Interpolate ================= //
inline void bgc_fp32_matrix2x3_interpolate(BGC_FP32_Matrix2x3* interpolation, const BGC_FP32_Matrix2x3* first, const BGC_FP32_Matrix2x3* second, const float phase) inline void bgc_fp32_matrix2x3_interpolate(BGC_FP32_Matrix2x3* const interpolation, const BGC_FP32_Matrix2x3* const first, const BGC_FP32_Matrix2x3* const second, const float phase)
{ {
const float couter_phase = 1.0f - phase; const float couter_phase = 1.0f - phase;
@ -645,7 +645,7 @@ inline void bgc_fp32_matrix2x3_interpolate(BGC_FP32_Matrix2x3* interpolation, co
interpolation->r3c2 = first->r3c2 * couter_phase + second->r3c2 * phase; interpolation->r3c2 = first->r3c2 * couter_phase + second->r3c2 * phase;
} }
inline void bgc_fp64_matrix2x3_interpolate(BGC_FP64_Matrix2x3* interpolation, const BGC_FP64_Matrix2x3* first, const BGC_FP64_Matrix2x3* second, const double phase) inline void bgc_fp64_matrix2x3_interpolate(BGC_FP64_Matrix2x3* const interpolation, const BGC_FP64_Matrix2x3* const first, const BGC_FP64_Matrix2x3* const second, const double phase)
{ {
const double couter_phase = 1.0 - phase; const double couter_phase = 1.0 - phase;

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

@ -1,64 +1,64 @@
#include "./matrix3x2.h" #include "./matrix3x2.h"
extern inline void bgc_fp32_matrix3x2_reset(BGC_FP32_Matrix3x2* matrix); extern inline void bgc_fp32_matrix3x2_reset(BGC_FP32_Matrix3x2* const matrix);
extern inline void bgc_fp64_matrix3x2_reset(BGC_FP64_Matrix3x2* matrix); extern inline void bgc_fp64_matrix3x2_reset(BGC_FP64_Matrix3x2* const matrix);
extern inline void bgc_fp32_matrix3x2_copy(BGC_FP32_Matrix3x2* destination, const BGC_FP32_Matrix3x2* source); extern inline void bgc_fp32_matrix3x2_copy(BGC_FP32_Matrix3x2* const destination, const BGC_FP32_Matrix3x2* const source);
extern inline void bgc_fp64_matrix3x2_copy(BGC_FP64_Matrix3x2* destination, const BGC_FP64_Matrix3x2* source); extern inline void bgc_fp64_matrix3x2_copy(BGC_FP64_Matrix3x2* const destination, const BGC_FP64_Matrix3x2* const source);
extern inline void bgc_fp32_matrix3x2_swap(BGC_FP32_Matrix3x2* matrix1, BGC_FP32_Matrix3x2* matrix2); extern inline void bgc_fp32_matrix3x2_swap(BGC_FP32_Matrix3x2* const matrix1, BGC_FP32_Matrix3x2* const matrix2);
extern inline void bgc_fp64_matrix3x2_swap(BGC_FP64_Matrix3x2* matrix1, BGC_FP64_Matrix3x2* matrix2); extern inline void bgc_fp64_matrix3x2_swap(BGC_FP64_Matrix3x2* const matrix1, BGC_FP64_Matrix3x2* const matrix2);
extern inline void bgc_fp32_matrix3x2_convert_to_fp64(BGC_FP64_Matrix3x2* destination, const BGC_FP32_Matrix3x2* source); extern inline void bgc_fp32_matrix3x2_convert_to_fp64(BGC_FP64_Matrix3x2* const destination, const BGC_FP32_Matrix3x2* const source);
extern inline void bgc_fp64_matrix3x2_convert_to_fp32(BGC_FP32_Matrix3x2* destination, const BGC_FP64_Matrix3x2* source); extern inline void bgc_fp64_matrix3x2_convert_to_fp32(BGC_FP32_Matrix3x2* const destination, const BGC_FP64_Matrix3x2* const source);
extern inline void bgc_fp32_matrix3x2_get_transposed(BGC_FP32_Matrix3x2* transposed, const BGC_FP32_Matrix2x3* matrix); extern inline void bgc_fp32_matrix3x2_get_transposed(BGC_FP32_Matrix3x2* const transposed, const BGC_FP32_Matrix2x3* const matrix);
extern inline void bgc_fp64_matrix3x2_get_transposed(BGC_FP64_Matrix3x2* transposed, const BGC_FP64_Matrix2x3* matrix); extern inline void bgc_fp64_matrix3x2_get_transposed(BGC_FP64_Matrix3x2* const transposed, const BGC_FP64_Matrix2x3* const matrix);
extern inline void bgc_fp32_matrix3x2_get_row(BGC_FP32_Vector3* row, const BGC_FP32_Matrix3x2* matrix, const int row_number); extern inline void bgc_fp32_matrix3x2_get_row(BGC_FP32_Vector3* const row, const BGC_FP32_Matrix3x2* const matrix, const int row_number);
extern inline void bgc_fp64_matrix3x2_get_row(BGC_FP64_Vector3* row, const BGC_FP64_Matrix3x2* matrix, const int row_number); extern inline void bgc_fp64_matrix3x2_get_row(BGC_FP64_Vector3* const row, const BGC_FP64_Matrix3x2* const matrix, const int row_number);
extern inline void bgc_fp32_matrix3x2_set_row(BGC_FP32_Matrix3x2* matrix, const int row_number, const BGC_FP32_Vector3* row); extern inline void bgc_fp32_matrix3x2_set_row(BGC_FP32_Matrix3x2* const matrix, const int row_number, const BGC_FP32_Vector3* const row);
extern inline void bgc_fp64_matrix3x2_set_row(BGC_FP64_Matrix3x2* matrix, const int row_number, const BGC_FP64_Vector3* row); extern inline void bgc_fp64_matrix3x2_set_row(BGC_FP64_Matrix3x2* const matrix, const int row_number, const BGC_FP64_Vector3* const row);
extern inline void bgc_fp32_matrix3x2_get_column(BGC_FP32_Vector2* column, const BGC_FP32_Matrix3x2* matrix, const int column_number); extern inline void bgc_fp32_matrix3x2_get_column(BGC_FP32_Vector2* const column, const BGC_FP32_Matrix3x2* const matrix, const int column_number);
extern inline void bgc_fp64_matrix3x2_get_column(BGC_FP64_Vector2* column, const BGC_FP64_Matrix3x2* matrix, const int column_number); extern inline void bgc_fp64_matrix3x2_get_column(BGC_FP64_Vector2* const column, const BGC_FP64_Matrix3x2* const matrix, const int column_number);
extern inline void bgc_fp32_matrix3x2_set_column(BGC_FP32_Matrix3x2* matrix, const int column_number, const BGC_FP32_Vector2* column); extern inline void bgc_fp32_matrix3x2_set_column(BGC_FP32_Matrix3x2* const matrix, const int column_number, const BGC_FP32_Vector2* const column);
extern inline void bgc_fp64_matrix3x2_set_column(BGC_FP64_Matrix3x2* matrix, const int column_number, const BGC_FP64_Vector2* column); extern inline void bgc_fp64_matrix3x2_set_column(BGC_FP64_Matrix3x2* const matrix, const int column_number, const BGC_FP64_Vector2* const column);
extern inline void bgc_fp32_matrix3x2_add(BGC_FP32_Matrix3x2* sum, const BGC_FP32_Matrix3x2* matrix1, const BGC_FP32_Matrix3x2* matrix2); extern inline void bgc_fp32_matrix3x2_add(BGC_FP32_Matrix3x2* const sum, const BGC_FP32_Matrix3x2* const matrix1, const BGC_FP32_Matrix3x2* const matrix2);
extern inline void bgc_fp64_matrix3x2_add(BGC_FP64_Matrix3x2* sum, const BGC_FP64_Matrix3x2* matrix1, const BGC_FP64_Matrix3x2* matrix2); extern inline void bgc_fp64_matrix3x2_add(BGC_FP64_Matrix3x2* const sum, const BGC_FP64_Matrix3x2* const matrix1, const BGC_FP64_Matrix3x2* const matrix2);
extern inline void bgc_fp32_matrix3x2_add_scaled(BGC_FP32_Matrix3x2* sum, const BGC_FP32_Matrix3x2* basic_matrix, const BGC_FP32_Matrix3x2* scalable_matrix, const float scale); extern inline void bgc_fp32_matrix3x2_add_scaled(BGC_FP32_Matrix3x2* const sum, const BGC_FP32_Matrix3x2* const basic_matrix, const BGC_FP32_Matrix3x2* const scalable_matrix, const float scale);
extern inline void bgc_fp64_matrix3x2_add_scaled(BGC_FP64_Matrix3x2* sum, const BGC_FP64_Matrix3x2* basic_matrix, const BGC_FP64_Matrix3x2* scalable_matrix, const double scale); extern inline void bgc_fp64_matrix3x2_add_scaled(BGC_FP64_Matrix3x2* const sum, const BGC_FP64_Matrix3x2* const basic_matrix, const BGC_FP64_Matrix3x2* const scalable_matrix, const double scale);
extern inline void bgc_fp32_matrix3x2_subtract(BGC_FP32_Matrix3x2* difference, const BGC_FP32_Matrix3x2* minuend, const BGC_FP32_Matrix3x2* subtrahend); extern inline void bgc_fp32_matrix3x2_subtract(BGC_FP32_Matrix3x2* const difference, const BGC_FP32_Matrix3x2* const minuend, const BGC_FP32_Matrix3x2* const subtrahend);
extern inline void bgc_fp64_matrix3x2_subtract(BGC_FP64_Matrix3x2* difference, const BGC_FP64_Matrix3x2* minuend, const BGC_FP64_Matrix3x2* subtrahend); extern inline void bgc_fp64_matrix3x2_subtract(BGC_FP64_Matrix3x2* const difference, const BGC_FP64_Matrix3x2* const minuend, const BGC_FP64_Matrix3x2* const subtrahend);
extern inline void bgc_fp32_matrix3x2_subtract_scaled(BGC_FP32_Matrix3x2* difference, const BGC_FP32_Matrix3x2* basic_matrix, const BGC_FP32_Matrix3x2* scalable_matrix, const float scale); extern inline void bgc_fp32_matrix3x2_subtract_scaled(BGC_FP32_Matrix3x2* const difference, const BGC_FP32_Matrix3x2* const basic_matrix, const BGC_FP32_Matrix3x2* const scalable_matrix, const float scale);
extern inline void bgc_fp64_matrix3x2_subtract_scaled(BGC_FP64_Matrix3x2* difference, const BGC_FP64_Matrix3x2* basic_matrix, const BGC_FP64_Matrix3x2* scalable_matrix, const double scale); extern inline void bgc_fp64_matrix3x2_subtract_scaled(BGC_FP64_Matrix3x2* const difference, const BGC_FP64_Matrix3x2* const basic_matrix, const BGC_FP64_Matrix3x2* const scalable_matrix, const double scale);
extern inline void bgc_fp32_matrix3x2_multiply_by_real(BGC_FP32_Matrix3x2* product, const BGC_FP32_Matrix3x2* multiplicand, const float multiplier); extern inline void bgc_fp32_matrix3x2_multiply_by_real(BGC_FP32_Matrix3x2* const product, const BGC_FP32_Matrix3x2* const multiplicand, const float multiplier);
extern inline void bgc_fp64_matrix3x2_multiply_by_real(BGC_FP64_Matrix3x2* product, const BGC_FP64_Matrix3x2* multiplicand, const double multiplier); extern inline void bgc_fp64_matrix3x2_multiply_by_real(BGC_FP64_Matrix3x2* const product, const BGC_FP64_Matrix3x2* const multiplicand, const double multiplier);
extern inline void bgc_fp32_matrix3x2_multiply_by_vector3(BGC_FP32_Vector2* product, const BGC_FP32_Matrix3x2* matrix, const BGC_FP32_Vector3* vector); extern inline void bgc_fp32_matrix3x2_multiply_by_vector3(BGC_FP32_Vector2* const product, const BGC_FP32_Matrix3x2* const matrix, const BGC_FP32_Vector3* const vector);
extern inline void bgc_fp64_matrix3x2_multiply_by_vector3(BGC_FP64_Vector2* product, const BGC_FP64_Matrix3x2* matrix, const BGC_FP64_Vector3* vector); extern inline void bgc_fp64_matrix3x2_multiply_by_vector3(BGC_FP64_Vector2* const product, const BGC_FP64_Matrix3x2* const matrix, const BGC_FP64_Vector3* const vector);
extern inline void bgc_fp32_matrix3x2_multiply_by_matrix2x3(BGC_FP32_Matrix2x2* product, const BGC_FP32_Matrix3x2* matrix1, const BGC_FP32_Matrix2x3* matrix2); extern inline void bgc_fp32_matrix3x2_multiply_by_matrix2x3(BGC_FP32_Matrix2x2* const product, const BGC_FP32_Matrix3x2* const matrix1, const BGC_FP32_Matrix2x3* const matrix2);
extern inline void bgc_fp64_matrix3x2_multiply_by_matrix2x3(BGC_FP64_Matrix2x2* product, const BGC_FP64_Matrix3x2* matrix1, const BGC_FP64_Matrix2x3* matrix2); extern inline void bgc_fp64_matrix3x2_multiply_by_matrix2x3(BGC_FP64_Matrix2x2* const product, const BGC_FP64_Matrix3x2* const matrix1, const BGC_FP64_Matrix2x3* const matrix2);
extern inline void bgc_fp32_matrix3x2_multiply_by_matrix3x3(BGC_FP32_Matrix3x2* product, const BGC_FP32_Matrix3x2* matrix1, const BGC_FP32_Matrix3x3* matrix2); extern inline void bgc_fp32_matrix3x2_multiply_by_matrix3x3(BGC_FP32_Matrix3x2* const product, const BGC_FP32_Matrix3x2* const matrix1, const BGC_FP32_Matrix3x3* const matrix2);
extern inline void bgc_fp64_matrix3x2_multiply_by_matrix3x3(BGC_FP64_Matrix3x2* product, const BGC_FP64_Matrix3x2* matrix1, const BGC_FP64_Matrix3x3* matrix2); extern inline void bgc_fp64_matrix3x2_multiply_by_matrix3x3(BGC_FP64_Matrix3x2* const product, const BGC_FP64_Matrix3x2* const matrix1, const BGC_FP64_Matrix3x3* const matrix2);