Переименование функций возведения в степень в get_power
This commit is contained in:
parent
1075624d05
commit
039b26305a
8 changed files with 17 additions and 17 deletions
|
|
@ -95,7 +95,7 @@ extern inline int bgc_fp64_complex_are_close(const BGC_FP64_Complex* number1, co
|
||||||
|
|
||||||
// =============== Get Exponation =============== //
|
// =============== Get Exponation =============== //
|
||||||
|
|
||||||
void bgc_fp32_complex_get_exponation(BGC_FP32_Complex* power, const BGC_FP32_Complex* base, const float real_exponent, const float imaginary_exponent)
|
void bgc_fp32_complex_get_power(BGC_FP32_Complex* power, const BGC_FP32_Complex* base, const float real_exponent, const float imaginary_exponent)
|
||||||
{
|
{
|
||||||
const float square_modulus = bgc_fp32_complex_get_square_modulus(base);
|
const float square_modulus = bgc_fp32_complex_get_square_modulus(base);
|
||||||
|
|
||||||
|
|
@ -115,7 +115,7 @@ void bgc_fp32_complex_get_exponation(BGC_FP32_Complex* power, const BGC_FP32_Com
|
||||||
power->imaginary = power_modulus * sinf(power_angle);
|
power->imaginary = power_modulus * sinf(power_angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bgc_fp64_complex_get_exponation(BGC_FP64_Complex* power, const BGC_FP64_Complex* base, const double real_exponent, const double imaginary_exponent)
|
void bgc_fp64_complex_get_power(BGC_FP64_Complex* power, const BGC_FP64_Complex* base, const double real_exponent, const double imaginary_exponent)
|
||||||
{
|
{
|
||||||
const double square_modulus = bgc_fp64_complex_get_square_modulus(base);
|
const double square_modulus = bgc_fp64_complex_get_square_modulus(base);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -317,11 +317,11 @@ inline int bgc_fp64_complex_invert(BGC_FP64_Complex* number)
|
||||||
return bgc_fp64_complex_get_inverse(number, number);
|
return bgc_fp64_complex_get_inverse(number, number);
|
||||||
}
|
}
|
||||||
|
|
||||||
// =============== Get Exponation =============== //
|
// ================= Get Power ================== //
|
||||||
|
|
||||||
void bgc_fp32_complex_get_exponation(BGC_FP32_Complex* power, const BGC_FP32_Complex* base, const float real_exponent, const float imaginary_exponent);
|
void bgc_fp32_complex_get_power(BGC_FP32_Complex* power, const BGC_FP32_Complex* base, const float real_exponent, const float imaginary_exponent);
|
||||||
|
|
||||||
void bgc_fp64_complex_get_exponation(BGC_FP64_Complex* power, const BGC_FP64_Complex* base, const double real_exponent, const double imaginary_exponent);
|
void bgc_fp64_complex_get_power(BGC_FP64_Complex* power, const BGC_FP64_Complex* base, const double real_exponent, const double imaginary_exponent);
|
||||||
|
|
||||||
// ==================== Add ===================== //
|
// ==================== Add ===================== //
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ extern inline int bgc_fp64_quaternion_are_close(const BGC_FP64_Quaternion* quate
|
||||||
|
|
||||||
// =============== Get Exponation =============== //
|
// =============== Get Exponation =============== //
|
||||||
|
|
||||||
int bgc_fp32_quaternion_get_exponation(BGC_FP32_Quaternion* power, const BGC_FP32_Quaternion* base, const float exponent)
|
int bgc_fp32_quaternion_get_power(BGC_FP32_Quaternion* power, const BGC_FP32_Quaternion* base, const float exponent)
|
||||||
{
|
{
|
||||||
const float s0s0 = base->s0 * base->s0;
|
const float s0s0 = base->s0 * base->s0;
|
||||||
const float x1x1 = base->x1 * base->x1;
|
const float x1x1 = base->x1 * base->x1;
|
||||||
|
|
@ -161,7 +161,7 @@ int bgc_fp32_quaternion_get_exponation(BGC_FP32_Quaternion* power, const BGC_FP3
|
||||||
return BGC_SUCCESS;
|
return BGC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bgc_fp64_quaternion_get_exponation(BGC_FP64_Quaternion* power, const BGC_FP64_Quaternion* base, const double exponent)
|
int bgc_fp64_quaternion_get_power(BGC_FP64_Quaternion* power, const BGC_FP64_Quaternion* base, const double exponent)
|
||||||
{
|
{
|
||||||
const double s0s0 = base->s0 * base->s0;
|
const double s0s0 = base->s0 * base->s0;
|
||||||
const double x1x1 = base->x1 * base->x1;
|
const double x1x1 = base->x1 * base->x1;
|
||||||
|
|
|
||||||
|
|
@ -670,9 +670,9 @@ inline int bgc_fp64_quaternion_get_normalized(BGC_FP64_Quaternion* normalized, c
|
||||||
|
|
||||||
// =============== Get Exponation =============== //
|
// =============== Get Exponation =============== //
|
||||||
|
|
||||||
int bgc_fp32_quaternion_get_exponation(BGC_FP32_Quaternion* power, const BGC_FP32_Quaternion* base, const float exponent);
|
int bgc_fp32_quaternion_get_power(BGC_FP32_Quaternion* power, const BGC_FP32_Quaternion* base, const float exponent);
|
||||||
|
|
||||||
int bgc_fp64_quaternion_get_exponation(BGC_FP64_Quaternion* power, const BGC_FP64_Quaternion* base, const double exponent);
|
int bgc_fp64_quaternion_get_power(BGC_FP64_Quaternion* power, const BGC_FP64_Quaternion* base, const double exponent);
|
||||||
|
|
||||||
// ============== Raw Turn Vector3 ============== //
|
// ============== Raw Turn Vector3 ============== //
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ extern inline void bgc_fp64_turn2_revert(BGC_FP64_Turn2* turn);
|
||||||
extern inline void bgc_fp32_turn2_get_reverse(BGC_FP32_Turn2* reverse, const BGC_FP32_Turn2* turn);
|
extern inline void bgc_fp32_turn2_get_reverse(BGC_FP32_Turn2* reverse, const BGC_FP32_Turn2* turn);
|
||||||
extern inline void bgc_fp64_turn2_get_reverse(BGC_FP64_Turn2* reverse, const BGC_FP64_Turn2* turn);
|
extern inline void bgc_fp64_turn2_get_reverse(BGC_FP64_Turn2* reverse, const BGC_FP64_Turn2* turn);
|
||||||
|
|
||||||
extern inline void bgc_fp32_turn2_get_exponation(BGC_FP32_Turn2* power, const BGC_FP32_Turn2* base, const float exponent);
|
extern inline void bgc_fp32_turn2_get_power(BGC_FP32_Turn2* power, const BGC_FP32_Turn2* base, const float exponent);
|
||||||
extern inline void bgc_fp64_turn2_get_exponation(BGC_FP64_Turn2* power, const BGC_FP64_Turn2* base, const double exponent);
|
extern inline void bgc_fp64_turn2_get_power(BGC_FP64_Turn2* power, const BGC_FP64_Turn2* base, const double exponent);
|
||||||
|
|
||||||
extern inline void bgc_fp32_turn2_combine(BGC_FP32_Turn2* combination, const BGC_FP32_Turn2* turn1, const BGC_FP32_Turn2* turn2);
|
extern inline void bgc_fp32_turn2_combine(BGC_FP32_Turn2* combination, const BGC_FP32_Turn2* turn1, const BGC_FP32_Turn2* turn2);
|
||||||
extern inline void bgc_fp64_turn2_combine(BGC_FP64_Turn2* combination, const BGC_FP64_Turn2* turn1, const BGC_FP64_Turn2* turn2);
|
extern inline void bgc_fp64_turn2_combine(BGC_FP64_Turn2* combination, const BGC_FP64_Turn2* turn1, const BGC_FP64_Turn2* turn2);
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ inline void bgc_fp64_turn2_get_reverse(BGC_FP64_Turn2* reverse, const BGC_FP64_T
|
||||||
|
|
||||||
// ================= Exponation ================= //
|
// ================= Exponation ================= //
|
||||||
|
|
||||||
inline void bgc_fp32_turn2_get_exponation(BGC_FP32_Turn2* power, const BGC_FP32_Turn2* base, const float exponent)
|
inline void bgc_fp32_turn2_get_power(BGC_FP32_Turn2* power, const BGC_FP32_Turn2* base, const float exponent)
|
||||||
{
|
{
|
||||||
const float power_angle = exponent * atan2f(base->_sin, base->_cos);
|
const float power_angle = exponent * atan2f(base->_sin, base->_cos);
|
||||||
|
|
||||||
|
|
@ -185,7 +185,7 @@ inline void bgc_fp32_turn2_get_exponation(BGC_FP32_Turn2* power, const BGC_FP32_
|
||||||
power->_sin = sinf(power_angle);
|
power->_sin = sinf(power_angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void bgc_fp64_turn2_get_exponation(BGC_FP64_Turn2* power, const BGC_FP64_Turn2* base, const double exponent)
|
inline void bgc_fp64_turn2_get_power(BGC_FP64_Turn2* power, const BGC_FP64_Turn2* base, const double exponent)
|
||||||
{
|
{
|
||||||
const double power_angle = exponent * atan2(base->_sin, base->_cos);
|
const double power_angle = exponent * atan2(base->_sin, base->_cos);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -535,7 +535,7 @@ int bgc_fp64_turn3_find_pair_difference(
|
||||||
|
|
||||||
// =============== Get Exponation =============== //
|
// =============== Get Exponation =============== //
|
||||||
|
|
||||||
void bgc_fp32_turn3_get_exponation(BGC_FP32_Turn3* power, const BGC_FP32_Turn3* base, const float exponent)
|
void bgc_fp32_turn3_get_power(BGC_FP32_Turn3* power, const BGC_FP32_Turn3* base, const float exponent)
|
||||||
{
|
{
|
||||||
const float square_vector = base->_versor.x1 * base->_versor.x1 + base->_versor.x2 * base->_versor.x2 + base->_versor.x3 * base->_versor.x3;
|
const float square_vector = base->_versor.x1 * base->_versor.x1 + base->_versor.x2 * base->_versor.x2 + base->_versor.x3 * base->_versor.x3;
|
||||||
|
|
||||||
|
|
@ -553,7 +553,7 @@ void bgc_fp32_turn3_get_exponation(BGC_FP32_Turn3* power, const BGC_FP32_Turn3*
|
||||||
bgc_fp32_turn3_set_raw_values(power, cosf(angle), base->_versor.x1 * multiplier, base->_versor.x2 * multiplier, base->_versor.x3 * multiplier);
|
bgc_fp32_turn3_set_raw_values(power, cosf(angle), base->_versor.x1 * multiplier, base->_versor.x2 * multiplier, base->_versor.x3 * multiplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bgc_fp64_turn3_get_exponation(BGC_FP64_Turn3* power, const BGC_FP64_Turn3* base, const double exponent)
|
void bgc_fp64_turn3_get_power(BGC_FP64_Turn3* power, const BGC_FP64_Turn3* base, const double exponent)
|
||||||
{
|
{
|
||||||
const double square_vector = base->_versor.x1 * base->_versor.x1 + base->_versor.x2 * base->_versor.x2 + base->_versor.x3 * base->_versor.x3;
|
const double square_vector = base->_versor.x1 * base->_versor.x1 + base->_versor.x2 * base->_versor.x2 + base->_versor.x3 * base->_versor.x3;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -287,9 +287,9 @@ inline void bgc_fp64_turn3_get_reverse(BGC_FP64_Turn3* inverse, const BGC_FP64_T
|
||||||
|
|
||||||
// =============== Get Exponation =============== //
|
// =============== Get Exponation =============== //
|
||||||
|
|
||||||
void bgc_fp32_turn3_get_exponation(BGC_FP32_Turn3* power, const BGC_FP32_Turn3* base, const float exponent);
|
void bgc_fp32_turn3_get_power(BGC_FP32_Turn3* power, const BGC_FP32_Turn3* base, const float exponent);
|
||||||
|
|
||||||
void bgc_fp64_turn3_get_exponation(BGC_FP64_Turn3* power, const BGC_FP64_Turn3* base, const double exponent);
|
void bgc_fp64_turn3_get_power(BGC_FP64_Turn3* power, const BGC_FP64_Turn3* base, const double exponent);
|
||||||
|
|
||||||
// ================ Combination ================= //
|
// ================ Combination ================= //
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue