mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Core/Movement: Spline<float> compile fix
This commit is contained in:
@@ -150,7 +150,7 @@ protected:
|
||||
|
||||
LengthArray lengths;
|
||||
|
||||
index_type computeIndexInBounds(length_type length) const;
|
||||
index_type computeIndexInBoundsAtLength(length_type length) const;
|
||||
public:
|
||||
|
||||
explicit Spline(){ }
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user