Добавление квалификатора const для запрета изменения указаелей внутри функций
This commit is contained in:
parent
610756ffed
commit
e6ac9023ec
24 changed files with 951 additions and 951 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
inline void bgc_fp32_slerp3_reset(BGC_FP32_Slerp3* slerp)
|
||||
inline void bgc_fp32_slerp3_reset(BGC_FP32_Slerp3* const slerp)
|
||||
{
|
||||
slerp->_cosine_weight.s0 = 1.0f;
|
||||
slerp->_cosine_weight.x1 = 0.0f;
|
||||
|
|
@ -22,7 +22,7 @@ inline void bgc_fp32_slerp3_reset(BGC_FP32_Slerp3* slerp)
|
|||
slerp->radians = 0.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp3_reset(BGC_FP64_Slerp3* slerp)
|
||||
inline void bgc_fp64_slerp3_reset(BGC_FP64_Slerp3* const slerp)
|
||||
{
|
||||
slerp->_cosine_weight.s0 = 1.0;
|
||||
slerp->_cosine_weight.x1 = 0.0;
|
||||
|
|
@ -39,12 +39,12 @@ inline void bgc_fp64_slerp3_reset(BGC_FP64_Slerp3* slerp)
|
|||
|
||||
// ==================== Make ==================== //
|
||||
|
||||
void bgc_fp32_slerp3_make(BGC_FP32_Slerp3* slerp, const BGC_FP32_Turn3* start, const BGC_FP32_Turn3* augment);
|
||||
void bgc_fp64_slerp3_make(BGC_FP64_Slerp3* slerp, const BGC_FP64_Turn3* start, const BGC_FP64_Turn3* augment);
|
||||
void bgc_fp32_slerp3_make(BGC_FP32_Slerp3* const slerp, const BGC_FP32_Turn3* const start, const BGC_FP32_Turn3* const augment);
|
||||
void bgc_fp64_slerp3_make(BGC_FP64_Slerp3* const slerp, const BGC_FP64_Turn3* const start, const BGC_FP64_Turn3* const augment);
|
||||
|
||||
// ================= Make Full ================== //
|
||||
|
||||
inline void bgc_fp32_slerp3_make_full(BGC_FP32_Slerp3* slerp, const BGC_FP32_Turn3* start, const BGC_FP32_Turn3* end)
|
||||
inline void bgc_fp32_slerp3_make_full(BGC_FP32_Slerp3* const slerp, const BGC_FP32_Turn3* const start, const BGC_FP32_Turn3* const end)
|
||||
{
|
||||
BGC_FP32_Turn3 augment;
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ inline void bgc_fp32_slerp3_make_full(BGC_FP32_Slerp3* slerp, const BGC_FP32_Tur
|
|||
bgc_fp32_slerp3_make(slerp, start, &augment);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp3_make_full(BGC_FP64_Slerp3* slerp, const BGC_FP64_Turn3* start, const BGC_FP64_Turn3* end)
|
||||
inline void bgc_fp64_slerp3_make_full(BGC_FP64_Slerp3* const slerp, const BGC_FP64_Turn3* const start, const BGC_FP64_Turn3* const end)
|
||||
{
|
||||
BGC_FP64_Turn3 augment;
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ inline void bgc_fp64_slerp3_make_full(BGC_FP64_Slerp3* slerp, const BGC_FP64_Tur
|
|||
|
||||
// =============== Make Shortened =============== //
|
||||
|
||||
inline void bgc_fp32_slerp3_make_shortened(BGC_FP32_Slerp3* slerp, const BGC_FP32_Turn3* start, const BGC_FP32_Turn3* end)
|
||||
inline void bgc_fp32_slerp3_make_shortened(BGC_FP32_Slerp3* const slerp, const BGC_FP32_Turn3* const start, const BGC_FP32_Turn3* const end)
|
||||
{
|
||||
BGC_FP32_Turn3 augment;
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ inline void bgc_fp32_slerp3_make_shortened(BGC_FP32_Slerp3* slerp, const BGC_FP3
|
|||
bgc_fp32_slerp3_make(slerp, start, &augment);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp3_make_shortened(BGC_FP64_Slerp3* slerp, const BGC_FP64_Turn3* start, const BGC_FP64_Turn3* end)
|
||||
inline void bgc_fp64_slerp3_make_shortened(BGC_FP64_Slerp3* const slerp, const BGC_FP64_Turn3* const start, const BGC_FP64_Turn3* const end)
|
||||
{
|
||||
BGC_FP64_Turn3 augment;
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ inline void bgc_fp64_slerp3_make_shortened(BGC_FP64_Slerp3* slerp, const BGC_FP6
|
|||
|
||||
// =============== Get Phase Turn =============== //
|
||||
|
||||
inline void bgc_fp32_slerp3_get_phase_turn(BGC_FP32_Turn3* turn, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
inline void bgc_fp32_slerp3_get_phase_turn(BGC_FP32_Turn3* const turn, const BGC_FP32_Slerp3* const slerp, const float phase)
|
||||
{
|
||||
const float angle = slerp->radians * phase;
|
||||
const float cosine = cosf(angle);
|
||||
|
|
@ -100,7 +100,7 @@ inline void bgc_fp32_slerp3_get_phase_turn(BGC_FP32_Turn3* turn, const BGC_FP32_
|
|||
bgc_fp32_turn3_set_quaternion(turn, &q);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp3_get_phase_turn(BGC_FP64_Turn3* turn, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
inline void bgc_fp64_slerp3_get_phase_turn(BGC_FP64_Turn3* const turn, const BGC_FP64_Slerp3* const slerp, const double phase)
|
||||
{
|
||||
const double angle = slerp->radians * phase;
|
||||
const double cosine = cos(angle);
|
||||
|
|
@ -116,7 +116,7 @@ inline void bgc_fp64_slerp3_get_phase_turn(BGC_FP64_Turn3* turn, const BGC_FP64_
|
|||
|
||||
// ========= Get Phase Rotation Matrix ========== //
|
||||
|
||||
inline void bgc_fp32_slerp3_get_phase_rotation_matrix(BGC_FP32_Matrix3x3* rotation_matrix, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
inline void bgc_fp32_slerp3_get_phase_rotation_matrix(BGC_FP32_Matrix3x3* const rotation_matrix, const BGC_FP32_Slerp3* const slerp, const float phase)
|
||||
{
|
||||
const float angle = slerp->radians * phase;
|
||||
const float cosine = cosf(angle);
|
||||
|
|
@ -130,7 +130,7 @@ inline void bgc_fp32_slerp3_get_phase_rotation_matrix(BGC_FP32_Matrix3x3* rotati
|
|||
bgc_fp32_quaternion_get_rotation_matrix(rotation_matrix, &q);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp3_get_phase_rotation_matrix(BGC_FP64_Matrix3x3* rotation_matrix, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
inline void bgc_fp64_slerp3_get_phase_rotation_matrix(BGC_FP64_Matrix3x3* const rotation_matrix, const BGC_FP64_Slerp3* const slerp, const double phase)
|
||||
{
|
||||
const double angle = slerp->radians * phase;
|
||||
const double cosine = cos(angle);
|
||||
|
|
@ -146,7 +146,7 @@ inline void bgc_fp64_slerp3_get_phase_rotation_matrix(BGC_FP64_Matrix3x3* rotati
|
|||
|
||||
// ========== Get Phase Reverse Matrix ========== //
|
||||
|
||||
inline void bgc_fp32_slerp3_get_phase_reverse_matrix(BGC_FP32_Matrix3x3* reverse_matrix, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
inline void bgc_fp32_slerp3_get_phase_reverse_matrix(BGC_FP32_Matrix3x3* const reverse_matrix, const BGC_FP32_Slerp3* const slerp, const float phase)
|
||||
{
|
||||
const float angle = slerp->radians * phase;
|
||||
const float cosine = cosf(angle);
|
||||
|
|
@ -160,7 +160,7 @@ inline void bgc_fp32_slerp3_get_phase_reverse_matrix(BGC_FP32_Matrix3x3* reverse
|
|||
bgc_fp32_quaternion_get_reverse_matrix(reverse_matrix, &q);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp3_get_phase_reverse_matrix(BGC_FP64_Matrix3x3* reverse_matrix, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
inline void bgc_fp64_slerp3_get_phase_reverse_matrix(BGC_FP64_Matrix3x3* const reverse_matrix, const BGC_FP64_Slerp3* const slerp, const double phase)
|
||||
{
|
||||
const double angle = slerp->radians * phase;
|
||||
const double cosine = cos(angle);
|
||||
|
|
@ -176,7 +176,7 @@ inline void bgc_fp64_slerp3_get_phase_reverse_matrix(BGC_FP64_Matrix3x3* reverse
|
|||
|
||||
// ========== Get Phase Both Matrices =========== //
|
||||
|
||||
inline void bgc_fp32_slerp3_get_phase_both_matrices(BGC_FP32_Matrix3x3* rotation_matrix, BGC_FP32_Matrix3x3* reverse_matrix, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
inline void bgc_fp32_slerp3_get_phase_both_matrices(BGC_FP32_Matrix3x3* const rotation_matrix, BGC_FP32_Matrix3x3* const reverse_matrix, const BGC_FP32_Slerp3* const slerp, const float phase)
|
||||
{
|
||||
const float angle = slerp->radians * phase;
|
||||
const float cosine = cosf(angle);
|
||||
|
|
@ -190,7 +190,7 @@ inline void bgc_fp32_slerp3_get_phase_both_matrices(BGC_FP32_Matrix3x3* rotation
|
|||
bgc_fp32_quaternion_get_both_matrices(rotation_matrix, reverse_matrix, &q);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp3_get_phase_both_matrices(BGC_FP64_Matrix3x3* rotation_matrix, BGC_FP64_Matrix3x3* reverse_matrix, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
inline void bgc_fp64_slerp3_get_phase_both_matrices(BGC_FP64_Matrix3x3* const rotation_matrix, BGC_FP64_Matrix3x3* const reverse_matrix, const BGC_FP64_Slerp3* const slerp, const double phase)
|
||||
{
|
||||
const double angle = slerp->radians * phase;
|
||||
const double cosine = cos(angle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue