Struct cppn::position::Position2d
[−]
[src]
pub struct Position2d(_);
Methods
impl Position2d
[src]
fn new(x: f64, y: f64) -> Self
[src]
fn x(&self) -> f64
[src]
fn y(&self) -> f64
[src]
fn xy(&self) -> (f64, f64)
[src]
Trait Implementations
impl Position for Position2d
[src]
fn dims() -> usize
[src]
fn coords(&self) -> &[f64]
[src]
fn origin() -> Self
[src]
fn distance_square(&self, other: &Self) -> f64
[src]
fn distance(&self, other: &Self) -> f64
[src]
impl Interpolate for Position2d
[src]
fn interpolate(&self, other: &Self, t: f64) -> Self
[src]
Linearly interpolates between self
and other
. For t = 0.0 this should return self
. For t = 1.0 this should return other
. Read more