pub struct DistanceInterpolator2 { /* private fields */ }Expand description
Distance interpolator 2 — tracks main distance + start or end join distance.
Port of C++ distance_interpolator2.
Implementations§
Source§impl DistanceInterpolator2
impl DistanceInterpolator2
Sourcepub fn new_start(
x1: i32,
y1: i32,
x2: i32,
y2: i32,
sx: i32,
sy: i32,
x: i32,
y: i32,
) -> Self
pub fn new_start( x1: i32, y1: i32, x2: i32, y2: i32, sx: i32, sy: i32, x: i32, y: i32, ) -> Self
Start join variant.
Sourcepub fn new_end(
x1: i32,
y1: i32,
x2: i32,
y2: i32,
ex: i32,
ey: i32,
x: i32,
y: i32,
) -> Self
pub fn new_end( x1: i32, y1: i32, x2: i32, y2: i32, ex: i32, ey: i32, x: i32, y: i32, ) -> Self
End join variant.
pub fn inc_x(&mut self, dy: i32)
pub fn dec_x(&mut self, dy: i32)
pub fn inc_y(&mut self, dx: i32)
pub fn dec_y(&mut self, dx: i32)
pub fn dist(&self) -> i32
pub fn dist_start(&self) -> i32
pub fn dist_end(&self) -> i32
pub fn dx_start(&self) -> i32
pub fn dy_start(&self) -> i32
pub fn dx_end(&self) -> i32
pub fn dy_end(&self) -> i32
Auto Trait Implementations§
impl Freeze for DistanceInterpolator2
impl RefUnwindSafe for DistanceInterpolator2
impl Send for DistanceInterpolator2
impl Sync for DistanceInterpolator2
impl Unpin for DistanceInterpolator2
impl UnwindSafe for DistanceInterpolator2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more