MCPcopy Create free account
hub / github.com/cinder/Cinder / loopTime

Method loopTime

src/cinder/TimelineItem.cpp:151–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151float TimelineItem::loopTime( float absTime )
152{
153 float result = absTime;
154
155 if( mPingPong ) {
156 result = math<float>::fmod( result * mInvDuration, 2 ); // varies from 0-2
157 if( result <= 1 )
158 result *= mDuration;
159 else
160 result = ( 2 - result ) * mDuration;
161 }
162 else if( mLoop ) {
163 result = math<float>::fmod( result * mInvDuration, 1 );
164 result *= mDuration;
165 }
166
167 return result;
168}
169
170} // namespace cinder

Callers

nothing calls this directly

Calls 1

fmodFunction · 0.85

Tested by

no test coverage detected