Добавление сферической интерполяции, переход от применения acos к применению atan2, исправление ошибок
This commit is contained in:
parent
f06b35ae34
commit
9d7011e81e
17 changed files with 558 additions and 134 deletions
|
|
@ -350,7 +350,7 @@ inline void bgc_vector3_get_mean_of_three_fp64(const BgcVector3FP64* vector1, co
|
|||
|
||||
// =================== Linear =================== //
|
||||
|
||||
inline void bgc_vector3_get_linear_interpolation_fp32(const BgcVector3FP32* vector1, const BgcVector3FP32* vector2, const float phase, BgcVector3FP32* interpolation)
|
||||
inline void bgc_vector3_interpolate_linearly_fp32(const BgcVector3FP32* vector1, const BgcVector3FP32* vector2, const float phase, BgcVector3FP32* interpolation)
|
||||
{
|
||||
const float counterphase = 1.0f - phase;
|
||||
|
||||
|
|
@ -359,7 +359,7 @@ inline void bgc_vector3_get_linear_interpolation_fp32(const BgcVector3FP32* vect
|
|||
interpolation->x3 = vector1->x3 * counterphase + vector2->x3 * phase;
|
||||
}
|
||||
|
||||
inline void bgc_vector3_get_linear_interpolation_fp64(const BgcVector3FP64* vector1, const BgcVector3FP64* vector2, const double phase, BgcVector3FP64* interpolation)
|
||||
inline void bgc_vector3_interpolate_linearly_fp64(const BgcVector3FP64* vector1, const BgcVector3FP64* vector2, const double phase, BgcVector3FP64* interpolation)
|
||||
{
|
||||
const double counterphase = 1.0 - phase;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue