Добавлено вощведение в степень комплексного числа

This commit is contained in:
Andrey Pokidov 2025-02-25 17:14:21 +07:00
parent 08c1e6d148
commit f547ba69e6
3 changed files with 50 additions and 2 deletions

View file

@ -129,7 +129,7 @@ inline float bgc_tangent_pair_get_angle_fp32(const BgcTangentPairFP32* tangent,
return 0.75f * bgc_angle_get_full_circle_fp32(unit);
}
return bgc_radians_to_units_fp32(atan2f(tangent->cos, tangent->sin), unit);
return bgc_radians_to_units_fp32(atan2f(tangent->sin, tangent->cos), unit);
}
inline double bgc_tangent_pair_get_angle_fp64(const BgcTangentPairFP64* tangent, const BgcAngleUnitEnum unit)
@ -150,7 +150,7 @@ inline double bgc_tangent_pair_get_angle_fp64(const BgcTangentPairFP64* tangent,
return 0.75 * bgc_angle_get_full_circle_fp64(unit);
}
return bgc_radians_to_units_fp64(atan2(tangent->cos, tangent->sin), unit);
return bgc_radians_to_units_fp64(atan2(tangent->sin, tangent->cos), unit);
}
// ==================== Copy ==================== //

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

@ -93,6 +93,48 @@ extern inline int bgc_vector2_are_close_enough_fp64(const BgcVector2FP64* vector
extern inline int bgc_vector2_are_close_fp32(const BgcVector2FP32* vector1, const BgcVector2FP32* vector2);
extern inline int bgc_vector2_are_close_fp64(const BgcVector2FP64* vector1, const BgcVector2FP64* vector2);
// =============== Complex Power ================ //
void bgc_vector2_get_complex_power_fp32(const BgcVector2FP32* base, const BgcVector2FP32* power, BgcVector2FP32* result)
{