[][src]Struct vec_arith::bezier2::Bezier2

pub struct Bezier2(pub Vec2<f32>, pub Vec2<f32>, pub Vec2<f32>);

Methods

impl Bezier2[src]

pub fn b(self, t: f32) -> Vec2<f32>[src]

pub fn intersections(self, p: Vec2<f32>, r: Vec2<f32>) -> usize[src]

https://github.com/w8r/bezier-intersect/blob/master/src/quadratic.js

pub fn distance2(self, p: Vec2<f32>) -> f32[src]

http://blog.gludion.com/2009/08/distance-to-quadratic-bezier-curve.html alternative: https://www.academia.edu/34616746/An_algorithm_for_computing_the_shortest_distance_between_a_point_and_quadratic_Bezier_curve

Trait Implementations

impl Copy for Bezier2[src]

impl Clone for Bezier2[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl From<Bezier2> for Bezier3[src]

https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Properties

impl Debug for Bezier2[src]

Auto Trait Implementations

impl Send for Bezier2

impl Sync for Bezier2

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<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]