[][src]Trait griditer::Coord

pub trait Coord: Clone + Copy + Add<Output = Self> + Sub<Output = Self> + Rem<Output = Self> + AddAssign + SubAssign + PartialEq + Eq + PartialOrd + Ord + Debug {
    type Diff: Copy + Add<Output = Self::Diff> + Sub<Output = Self::Diff> + PartialOrd<Self::Diff>;

    const ZERO: Self;
    const ONE: Self;

    fn from_f32(value: f32) -> Self;
fn from_diff(value: Self::Diff) -> Self;
fn into_f32(self) -> f32;
fn into_diff(self) -> Self::Diff;
fn diff_into_f32(value: Self::Diff) -> f32;
fn signum(value: Self::Diff) -> Self::Diff;
fn abs_diff(value: Self::Diff) -> Self::Diff; }

Trait for grid coordinates used by iterators. Implemented for every built-in integer type.

Associated Types

type Diff: Copy + Add<Output = Self::Diff> + Sub<Output = Self::Diff> + PartialOrd<Self::Diff>

Signed type corresponding to Self.

Loading content...

Associated Constants

const ZERO: Self

const ONE: Self

Loading content...

Required methods

fn from_f32(value: f32) -> Self

fn from_diff(value: Self::Diff) -> Self

fn into_f32(self) -> f32

fn into_diff(self) -> Self::Diff

fn diff_into_f32(value: Self::Diff) -> f32

fn signum(value: Self::Diff) -> Self::Diff

fn abs_diff(value: Self::Diff) -> Self::Diff

Loading content...

Implementations on Foreign Types

impl Coord for u8[src]

type Diff = i8

impl Coord for i8[src]

type Diff = i8

impl Coord for u16[src]

type Diff = i16

impl Coord for i16[src]

type Diff = i16

impl Coord for u32[src]

type Diff = i32

impl Coord for i32[src]

type Diff = i32

impl Coord for u64[src]

type Diff = i64

impl Coord for i64[src]

type Diff = i64

impl Coord for u128[src]

type Diff = i128

impl Coord for i128[src]

type Diff = i128

impl Coord for usize[src]

type Diff = isize

impl Coord for isize[src]

type Diff = isize

Loading content...

Implementors

Loading content...