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

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

Returns the precision for the real and imaginary parts.

Examples

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

Implementations on Foreign Types

impl Prec for u32
[src]

[src]

impl Prec for (u32, u32)
[src]

[src]

Implementors