| 
    OpenShot Library | libopenshot
    0.4.0
    
   | 
 
 
 
 
Go to the documentation of this file.
   36     return float(
num) / float(
den);
 
   41     return double(
num) / double(
den);
 
   46     return round((
double) 
num / 
den);
 
   59         second = first % second;
 
  
float ToFloat()
Return this fraction as a float (i.e. 1/2 = 0.5)
 
Header file for Fraction class.
 
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.
 
int GreatestCommonDenominator()
Calculate the greatest common denominator.
 
double ToDouble() const
Return this fraction as a double (i.e. 1/2 = 0.5)
 
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)
 
Fraction Reciprocal() const
Return the reciprocal as a Fraction.