Небольшие исправления в SLERP
This commit is contained in:
parent
78d1661c5d
commit
4509b26e73
1 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ void bgc_fp32_slerp_make(BGC_FP32_Slerp* slerp, const BGC_FP32_Turn3* start, con
|
||||||
{
|
{
|
||||||
const float square_vector = augment->_versor.x1 * augment->_versor.x1 + augment->_versor.x2 * augment->_versor.x2 + augment->_versor.x3 * augment->_versor.x3;
|
const float square_vector = augment->_versor.x1 * augment->_versor.x1 + augment->_versor.x2 * augment->_versor.x2 + augment->_versor.x3 * augment->_versor.x3;
|
||||||
|
|
||||||
if (square_vector != square_vector) {
|
if (isnan(square_vector)) {
|
||||||
bgc_fp32_slerp_reset(slerp);
|
bgc_fp32_slerp_reset(slerp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -57,7 +57,7 @@ void bgc_fp64_slerp_make(BGC_FP64_Slerp* slerp, const BGC_FP64_Turn3* start, con
|
||||||
{
|
{
|
||||||
const double square_vector = augment->_versor.x1 * augment->_versor.x1 + augment->_versor.x2 * augment->_versor.x2 + augment->_versor.x3 * augment->_versor.x3;
|
const double square_vector = augment->_versor.x1 * augment->_versor.x1 + augment->_versor.x2 * augment->_versor.x2 + augment->_versor.x3 * augment->_versor.x3;
|
||||||
|
|
||||||
if (square_vector != square_vector) {
|
if (isnan(square_vector)) {
|
||||||
bgc_fp64_slerp_reset(slerp);
|
bgc_fp64_slerp_reset(slerp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue