[][src]Trait rug::complex::Prec

pub trait Prec {
    fn prec(self) -> (u32, u32);
}

The Prec trait is used to specify the precision of the real and imaginary parts of a Complex number.

This trait is implememented for u32 and for (u32, u32).

Examples

use rug::Complex;
let c1 = Complex::new(32);
assert_eq!(c1.prec(), (32, 32));
let c2 = Complex::new((32, 64));
assert_eq!(c2.prec(), (32, 64));

Required methods

fn prec(self) -> (u32, u32)

Returns the precision for the real and imaginary parts.

Examples

use rug::complex::Prec;
assert_eq!(Prec::prec(24), (24, 24));
assert_eq!(Prec::prec((24, 53)), (24, 53));
Loading content...

Implementations on Foreign Types

impl Prec for u32[src]

impl Prec for (u32, u32)[src]

Loading content...

Implementors

Loading content...