Добавление новых функций, возвращение функций subtract_scaled
This commit is contained in:
parent
727961ad98
commit
1075624d05
26 changed files with 836 additions and 292 deletions
|
|
@ -372,7 +372,7 @@ inline void bgc_fp64_matrix3x2_add(BGC_FP64_Matrix3x2* sum, const BGC_FP64_Matri
|
|||
sum->r2c3 = matrix1->r2c3 + matrix2->r2c3;
|
||||
}
|
||||
|
||||
// ================= Add scaled ================= //
|
||||
// ================= Add Scaled ================= //
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
@ -420,6 +420,30 @@ inline void bgc_fp64_matrix3x2_subtract(BGC_FP64_Matrix3x2* difference, const BG
|
|||
difference->r2c3 = minuend->r2c3 - subtrahend->r2c3;
|
||||
}
|
||||
|
||||
// ============== Subtract Scaled =============== //
|
||||
|
||||
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)
|
||||
{
|
||||
difference->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale;
|
||||
difference->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale;
|
||||
difference->r1c3 = basic_matrix->r1c3 - scalable_matrix->r1c3 * scale;
|
||||
|
||||
difference->r2c1 = basic_matrix->r2c1 - scalable_matrix->r2c1 * scale;
|
||||
difference->r2c2 = basic_matrix->r2c2 - scalable_matrix->r2c2 * scale;
|
||||
difference->r2c3 = basic_matrix->r2c3 - scalable_matrix->r2c3 * scale;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
difference->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale;
|
||||
difference->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale;
|
||||
difference->r1c3 = basic_matrix->r1c3 - scalable_matrix->r1c3 * scale;
|
||||
|
||||
difference->r2c1 = basic_matrix->r2c1 - scalable_matrix->r2c1 * scale;
|
||||
difference->r2c2 = basic_matrix->r2c2 - scalable_matrix->r2c2 * scale;
|
||||
difference->r2c3 = basic_matrix->r2c3 - scalable_matrix->r2c3 * scale;
|
||||
}
|
||||
|
||||
// ================== Multiply ================== //
|
||||
|
||||
inline void bgc_fp32_matrix3x2_multiply_by_real(BGC_FP32_Matrix3x2* product, const BGC_FP32_Matrix3x2* multiplicand, const float multiplier)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue