Core/Movement: Spline<float> compile fix

This commit is contained in:
Shauren
2025-05-29 12:52:11 +02:00
parent ab972a9e97
commit a37133e18f
2 changed files with 4 additions and 4 deletions

View File

@@ -150,7 +150,7 @@ protected:
LengthArray lengths;
index_type computeIndexInBounds(length_type length) const;
index_type computeIndexInBoundsAtLength(length_type length) const;
public:
explicit Spline(){ }

View File

@@ -33,7 +33,7 @@ template<typename length_type> void Spline<length_type>::evaluate_derivative(flo
evaluate_derivative(Index, u, hermite);
}
template<typename length_type> SplineBase::index_type Spline<length_type>::computeIndexInBounds(length_type length_) const
template<typename length_type> SplineBase::index_type Spline<length_type>::computeIndexInBoundsAtLength(length_type length_) const
{
// Temporary disabled: causes infinite loop with t = 1.f
/*
@@ -64,7 +64,7 @@ template<typename length_type> void Spline<length_type>::computeIndex(float t, i
{
ASSERT(t >= 0.f && t <= 1.f);
length_type length_ = t * length();
out_idx = computeIndexInBounds(length_);
out_idx = computeIndexInBoundsAtLength(length_);
ASSERT(out_idx < index_hi);
out_u = (length_ - length(out_idx)) / (float)length(out_idx, out_idx+1);
}
@@ -72,7 +72,7 @@ template<typename length_type> void Spline<length_type>::computeIndex(float t, i
template<typename length_type> SplineBase::index_type Spline<length_type>::computeIndexInBounds( float t ) const
{
ASSERT(t >= 0.f && t <= 1.f);
return computeIndexInBounds(t * length());
return computeIndexInBoundsAtLength(t * length());
}
template<typename length_type> void Spline<length_type>::initLengths()