openMSX
|
Like getTicksTill(), but also returns the fractional part (in range [0, 1)). More...
#include <DynamicClock.hh>
Public Attributes | |
unsigned | integral |
float | fractional |
Like getTicksTill(), but also returns the fractional part (in range [0, 1)).
This is equivalent to, but numerically more stable than: EmuDuration dur = e - this->getTime(); double d = dur / this->getPeriod(); int i = int(d); double frac = d - i; return {i, frac};
Definition at line 64 of file DynamicClock.hh.
float openmsx::DynamicClock::IntegralFractional::fractional |
Definition at line 66 of file DynamicClock.hh.
unsigned openmsx::DynamicClock::IntegralFractional::integral |
Definition at line 65 of file DynamicClock.hh.