[−][src]Struct arcs::primitives::Line
Fields
start: Vector
end: Vector
Methods
impl Line
[src]
pub const fn new(start: Vector, end: Vector) -> Self
[src]
pub fn displacement(&self) -> Vector
[src]
pub fn direction(&self) -> Vector
[src]
pub fn length(self) -> f64
[src]
pub fn perpendicular_distance_to(self, point: Vector) -> f64
[src]
Trait Implementations
impl Approximate for Line
[src]
type Iter = Chain<Once<Vector>, Once<Vector>>
fn approximate(&self, _tolerance: f64) -> Self::Iter
[src]
impl Bounded for Line
[src]
fn bounding_box(&self) -> BoundingBox
[src]
impl Clone for Line
[src]
impl ClosestPoint for Line
[src]
fn closest_point(&self, target: Vector) -> Closest
[src]
impl Copy for Line
[src]
impl Debug for Line
[src]
impl Length for Line
[src]
fn length(&self) -> f64
[src]
Calculates the length of the line.
let line = Line::new(Vector::zero(), Vector::new(5.0, 0.0)); assert_eq!(line.length(), 5.0);
impl PartialEq<Line> for Line
[src]
impl Scale for Line
[src]
fn scale(&mut self, factor: f64, base: Vector)
[src]
fn scaled(&self, factor: f64, base: Vector) -> Self where
Self: Sized + Clone,
[src]
Self: Sized + Clone,
impl StructuralPartialEq for Line
[src]
impl Translate for Line
[src]
Auto Trait Implementations
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any + Send + Sync,
[src]
T: Any + Send + Sync,
impl<T> RoundFrom<T> for T
[src]
fn round_from(x: T) -> T
[src]
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
[src]
U: RoundFrom<T>,
fn round_into(self) -> U
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,