]> git.tdb.fi Git - libs/gl.git/commitdiff
Use matching type to retrieve interpolated spline values
authorMikko Rasa <tdb@tdb.fi>
Sun, 17 Jan 2021 17:02:26 +0000 (19:02 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 17 Jan 2021 17:02:26 +0000 (19:02 +0200)
This way the double-to-float conversion is done at a more relevant stage.

source/animation.cpp

index e568d2217f1ff18f54323509e455c6b61443881a..a8d9e9698625b027997586745cd71b9c73c1d305 100644 (file)
@@ -391,7 +391,7 @@ void Animation::ValueCurve<N>::apply(float x, KeyFrame::AnimatedUniform &uni) co
        uni.size = N;
        typename Interpolate::Spline<double, 3, N>::Value value = spline(x);
        for(unsigned i=0; i<N; ++i)
-               uni.values[i] = Interpolate::SplineValue<float, N>::get(value, i);
+               uni.values[i] = Interpolate::SplineValue<double, N>::get(value, i);
 }