Исправление опечатки
This commit is contained in:
parent
880673a17a
commit
0dcd9c0d4d
2 changed files with 26 additions and 10 deletions
|
@ -40,17 +40,17 @@ void bgc_slerp_make_fp32(const BgcVersorFP32* start, const BgcVersorFP32* augmen
|
|||
|
||||
slerp->radians = atan2f(vector_modulus, augment->s0);
|
||||
|
||||
const float mutliplier = 1.0f / vector_modulus;
|
||||
const float multiplier = 1.0f / vector_modulus;
|
||||
|
||||
slerp->s0_cos_weight = start->s0;
|
||||
slerp->x1_cos_weight = start->x1;
|
||||
slerp->x2_cos_weight = start->x2;
|
||||
slerp->x3_cos_weight = start->x3;
|
||||
|
||||
slerp->s0_sin_weight = -mutliplier * (augment->x1 * start->x1 + augment->x2 * start->x2 + augment->x3 * start->x3);
|
||||
slerp->x1_sin_weight = mutliplier * (augment->x1 * start->s0 + augment->x2 * start->x3 - augment->x3 * start->x2);
|
||||
slerp->x2_sin_weight = mutliplier * (augment->x2 * start->s0 - augment->x1 * start->x3 + augment->x3 * start->x1);
|
||||
slerp->x3_sin_weight = mutliplier * (augment->x3 * start->s0 - augment->x2 * start->x1 + augment->x1 * start->x2);
|
||||
slerp->s0_sin_weight = -multiplier * (augment->x1 * start->x1 + augment->x2 * start->x2 + augment->x3 * start->x3);
|
||||
slerp->x1_sin_weight = multiplier * (augment->x1 * start->s0 + augment->x2 * start->x3 - augment->x3 * start->x2);
|
||||
slerp->x2_sin_weight = multiplier * (augment->x2 * start->s0 - augment->x1 * start->x3 + augment->x3 * start->x1);
|
||||
slerp->x3_sin_weight = multiplier * (augment->x3 * start->s0 - augment->x2 * start->x1 + augment->x1 * start->x2);
|
||||
}
|
||||
|
||||
void bgc_slerp_make_fp64(const BgcVersorFP64* start, const BgcVersorFP64* augment, BgcSlerpFP64* slerp)
|
||||
|
@ -81,15 +81,15 @@ void bgc_slerp_make_fp64(const BgcVersorFP64* start, const BgcVersorFP64* augmen
|
|||
|
||||
slerp->radians = atan2(vector_modulus, augment->s0);
|
||||
|
||||
const double mutliplier = 1.0 / vector_modulus;
|
||||
const double multiplier = 1.0 / vector_modulus;
|
||||
|
||||
slerp->s0_cos_weight = start->s0;
|
||||
slerp->x1_cos_weight = start->x1;
|
||||
slerp->x2_cos_weight = start->x2;
|
||||
slerp->x3_cos_weight = start->x3;
|
||||
|
||||
slerp->s0_sin_weight = -mutliplier * (augment->x1 * start->x1 + augment->x2 * start->x2 + augment->x3 * start->x3);
|
||||
slerp->x1_sin_weight = mutliplier * (augment->x1 * start->s0 + augment->x2 * start->x3 - augment->x3 * start->x2);
|
||||
slerp->x2_sin_weight = mutliplier * (augment->x2 * start->s0 - augment->x1 * start->x3 + augment->x3 * start->x1);
|
||||
slerp->x3_sin_weight = mutliplier * (augment->x3 * start->s0 - augment->x2 * start->x1 + augment->x1 * start->x2);
|
||||
slerp->s0_sin_weight = -multiplier * (augment->x1 * start->x1 + augment->x2 * start->x2 + augment->x3 * start->x3);
|
||||
slerp->x1_sin_weight = multiplier * (augment->x1 * start->s0 + augment->x2 * start->x3 - augment->x3 * start->x2);
|
||||
slerp->x2_sin_weight = multiplier * (augment->x2 * start->s0 - augment->x1 * start->x3 + augment->x3 * start->x1);
|
||||
slerp->x3_sin_weight = multiplier * (augment->x3 * start->s0 - augment->x2 * start->x1 + augment->x1 * start->x2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue