digiKam
heif::Fraction Class Reference

Public Member Functions

 Fraction ()
 
 Fraction (int32_t num, int32_t den)
 
bool is_valid () const
 
Fraction operator+ (const Fraction &) const
 
Fraction operator- (const Fraction &) const
 
Fraction operator- (int) const
 
Fraction operator/ (int) const
 
int32_t round () const
 
int32_t round_down () const
 
int32_t round_up () const
 

Public Attributes

int32_t denominator = 1
 
int32_t numerator = 0
 

Constructor & Destructor Documentation

◆ Fraction() [1/2]

heif::Fraction::Fraction ( )
inline

◆ Fraction() [2/2]

heif::Fraction::Fraction ( int32_t  num,
int32_t  den 
)

Member Function Documentation

◆ is_valid()

bool heif::Fraction::is_valid ( ) const

◆ operator+()

Fraction heif::Fraction::operator+ ( const Fraction ) const

◆ operator-() [1/2]

Fraction heif::Fraction::operator- ( const Fraction ) const

◆ operator-() [2/2]

Fraction heif::Fraction::operator- ( int  ) const

◆ operator/()

Fraction heif::Fraction::operator/ ( int  ) const

◆ round()

int32_t heif::Fraction::round ( ) const

◆ round_down()

int32_t heif::Fraction::round_down ( ) const

◆ round_up()

int32_t heif::Fraction::round_up ( ) const

Member Data Documentation

◆ denominator

int32_t heif::Fraction::denominator = 1

◆ numerator

int32_t heif::Fraction::numerator = 0

The documentation for this class was generated from the following file: