Struct ffmpeg::util::rational::Rational
[−]
[src]
pub struct Rational(pub i32, pub i32);
Methods
impl Rational
[src]
pub fn new(numerator: i32, denominator: i32) -> Self
[src]
pub fn numerator(&self) -> i32
[src]
pub fn denominator(&self) -> i32
[src]
pub fn reduce(&self) -> Rational
[src]
pub fn reduce_with_limit(&self, max: i32) -> Result<Rational, Rational>
[src]
pub fn invert(&self) -> Rational
[src]
Trait Implementations
impl Copy for Rational
[src]
impl Clone for Rational
[src]
fn clone(&self) -> Rational
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<AVRational> for Rational
[src]
fn from(value: AVRational) -> Rational
[src]
Performs the conversion.
impl Into<AVRational> for Rational
[src]
fn into(self) -> AVRational
[src]
Performs the conversion.
impl From<f64> for Rational
[src]
impl From<Rational> for f64
[src]
impl From<Rational> for u32
[src]
impl From<(i32, i32)> for Rational
[src]
impl PartialEq for Rational
[src]
fn eq(&self, other: &Rational) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for Rational
[src]
impl PartialOrd for Rational
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Add for Rational
[src]
type Output = Rational
The resulting type after applying the +
operator.
fn add(self, other: Rational) -> Rational
[src]
Performs the +
operation.
impl Sub for Rational
[src]
type Output = Rational
The resulting type after applying the -
operator.
fn sub(self, other: Rational) -> Rational
[src]
Performs the -
operation.
impl Mul for Rational
[src]
type Output = Rational
The resulting type after applying the *
operator.
fn mul(self, other: Rational) -> Rational
[src]
Performs the *
operation.
impl Div for Rational
[src]
type Output = Rational
The resulting type after applying the /
operator.
fn div(self, other: Rational) -> Rational
[src]
Performs the /
operation.
impl Display for Rational
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more