// Part 3 int addTimes( int start, int duration ) { /* This function returns the finishing time given a starting time and the duration of time elapsed since. Pre: 'start' and 'duration' are specified in military time (ie 1400) Post: Finishing time is returned in military time */ int mins; mins = getMins( start ) + getMins( duration ); return getHours( mins ); }
vec2 SpriteDef::calculateSizeFromShapeData () const { if (_shapeSizeCalculated) return _cachedShapeSize; if (!hasShape()) { _cachedShapeSize = vec2_zero; _shapeSizeCalculated = true; return _cachedShapeSize; } const vec2 mins = getMins(); const vec2 maxs = getMaxs(); _cachedShapeSize = vec2(maxs.x - mins.x, maxs.y - mins.y); _shapeSizeCalculated = true; return _cachedShapeSize; }
GTID GTIDManager::getMinLiveGTID() { GTID minLive; GTID minUnapplied; getMins(&minLive, &minUnapplied); return minLive; }