Removed Framerate class, since its functionality is already represented in the Fraction class. Also, corrected a few unittests, and updated some documentation.

This commit is contained in:
Jonathan Thomas
2014-01-05 23:12:56 -06:00
parent f25f342825
commit e2f5ca8a69
20 changed files with 73 additions and 294 deletions

View File

@@ -47,6 +47,12 @@ double Fraction::ToDouble() {
return double(num) / double(den);
}
// Return a rounded integer of the frame rate (for example 30000/1001 returns 30 fps)
int Fraction::ToInt() {
return round((float) num / den);
}
// Calculate the greatest common denominator
int Fraction::GreatestCommonDenominator() {
int first = num;
int second = den;