[][src]Struct line_drawing::BresenhamCircle

pub struct BresenhamCircle<T> { /* fields omitted */ }

An implementation of Bresenham's circle algorithm.

This uses four quadrants, so calling next() will return a point for the first quadrant, then the second, third, fourth and then back to first.

Example:

extern crate line_drawing;
use line_drawing::BresenhamCircle;

fn main() {
    for (x, y) in BresenhamCircle::new(0, 0, 1) {
        print!("({}, {}), ", x, y);
    }
}
(1, 0), (0, 1), (-1, 0), (0, -1),

Methods

impl<T: SignedNum> BresenhamCircle<T>[src]

pub fn new(center_x: T, center_y: T, radius: T) -> Self[src]

Trait Implementations

impl<T: SignedNum> Iterator for BresenhamCircle<T>[src]

type Item = Point<T>

The type of the elements being iterated over.

Auto Trait Implementations

impl<T> Send for BresenhamCircle<T> where
    T: Send

impl<T> Unpin for BresenhamCircle<T> where
    T: Unpin

impl<T> Sync for BresenhamCircle<T> where
    T: Sync

impl<T> UnwindSafe for BresenhamCircle<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for BresenhamCircle<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]