void CalculateTotalArea() { //get total area using trapezoids //we'll get it as every 60th of a second, so find how many sections we want //closer the sections are, the more accurate we'll have for our time float sectionWidth = 1.0f / 60.0f; float endTime = m_spawnRateCurve.GetLastKeyTime(); m_totalArea = m_spawnRateCurve.GetAreaUnderCurve(0, endTime, sectionWidth, m_timeSpan); }