OpenShot Library | libopenshot
0.2.5
|
Go to the documentation of this file.
31 #ifndef OPENSHOT_FRACTION_H
32 #define OPENSHOT_FRACTION_H
float ToFloat()
Return this fraction as a float (i.e. 1/2 = 0.5)
int ToInt()
Return a rounded integer of the fraction (for example 30000/1001 returns 30)
This namespace is the default namespace for all code in the openshot library.
This class represents a fraction.
Fraction Reciprocal()
Return the reciprocal as a Fraction.
int GreatestCommonDenominator()
Calculate the greatest common denominator.
Fraction()
Default Constructor.
int num
Numerator for the fraction.
int den
Denominator for the fraction.
void Reduce()
Reduce this fraction (i.e. 640/480 = 4/3)
double ToDouble()
Return this fraction as a double (i.e. 1/2 = 0.5)