template<typename T> inline uint16_t tween<T>::pointAt(float progress) const {
auto t = static_cast<uint32_t>(progress * total);// Cause uncertainty
uint16_t point = 0;
while (t > points.at(point).stacked) point++;
if (point > 0 && t <= points.at(point - 1u).stacked) point--;
return point;
}
and this one
template<typename T>
inline void tween<T>::interpolate(float prog, unsigned point, T & value) const {
auto & p = points.at(point);
//during fix
auto pointDuration = /*uint32_t for origin*/lround(p.duration() - (p.stacked - (prog * static_cast<float>(total))));
float pointTotal = static_cast<float>(pointDuration) / static_cast<float>(p.duration());
if (pointTotal > 1.0f) pointTotal = 1.0f;
auto easing = std::get<0>(p.easings);
value = easing(pointTotal, std::get<0>(p.values), std::get<0>(points.at(point+1).values));
}