C++ (Qt)Container<double> c1; Container<coordinate> c2; Container<color> c3;
Bashigors: Total time (sec) = 29m_ax: Total time (sec) = 39
C++ (Qt)double GetNth(size_t index) const __attribute__((noinline))...double SetNth(size_t index) const __attribute__((noinline))...
C++ (Qt)CData operator + ( const CData & a, const CData & b ){ assert(a.m_type == b.m_type && !a.IsNull()); // видимо это надо вынести в метод switch (a.m_type) { case CData ::type_Value: return a.m_value + b.m_value; case CData ::type_Coord: return a.m_coord + b.m_coord; case CData ::type_Color: return a.m_color + b.m_color; } assert(0); return CData();}
C++ (Qt)inlineCoord operator+(const Coord& a, const Coord& b){ return Coord{Internal::addArray(a, b)}; } inlineColor operator+(const Color& a, const Color& b){ return Color{Internal::addArray(a, b)}; } template <class E>inlineVarData operator+(const VarData& a, const E& b){ return std::get<E>(a) + b; } template <class E>inlineVarData operator+(const E& a, const VarData& b){ return b + a; } inlineVarData operator+(const VarData& a, const VarData& b){ return std::visit([&](const auto& b_v) { return VarData{a + b_v}; }, b); }
C++ (Qt)CData curr = containter.GetKeyData(index); CData next = containter.GetKeyData(index + 1); double deltaT = containter.GetKeyTime(index + 1) - containter.GetKeyTime(index); container.SetSplineParam(index, SPLINE_OUT_ANGLE, (next - curr).atan2(deltaT));